diff options
127 files changed, 1552 insertions, 4681 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 445e0cf..7a39e2f 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | @@ -143,7 +143,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | diff --git a/.github/workflows/linux-with-tcl86-build.yml b/.github/workflows/linux-with-tcl86-build.yml deleted file mode 100644 index bdd77a1..0000000 --- a/.github/workflows/linux-with-tcl86-build.yml +++ /dev/null @@ -1,178 +0,0 @@ -name: Linux (with Tcl 8.6) -on: - push: - branches: - - "main" - - "core-8-branch" - - "core-8-6-branch" - tags: - - "core-**" -permissions: - contents: read -defaults: - run: - shell: bash - working-directory: tk/unix -env: - ERROR_ON_FAILURES: 1 -jobs: - build: - runs-on: ubuntu-22.04 - strategy: - matrix: - compiler: - - "gcc" - - "clang" - cfgopt: - - "" - - "CFLAGS=-DTK_NO_DEPRECATED=1" - - "--disable-shared" - - "--disable-xft" - - "--disable-xss" - - "--enable-symbols" - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: tk - - name: Checkout Tcl - uses: actions/checkout@v4 - with: - repository: tcltk/tcl - ref: core-8-6-branch - path: tcl - - name: Setup Environment (compiler=${{ matrix.compiler }}) - run: | - sudo apt-get install libxss-dev libxft-dev - mkdir "$HOME/install dir" - touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV - echo "CC=$COMPILER" >> $GITHUB_ENV - echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV - echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV - working-directory: "." - env: - CFGOPT: ${{ matrix.cfgopt }} - COMPILER: ${{ matrix.compiler }} - OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }} - - name: Configure and Build Tcl - run: | - ./configure $CFGOPT "--prefix=$HOME/install dir" || { - cat config.log - echo "::warning::Failure during Tcl Configure" - exit 1 - } - make all install || { - echo "::warning::Failure during Tcl Build" - exit 1 - } - echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV - working-directory: tcl/unix - - name: Configure (opts=${{ matrix.cfgopt }}) - run: | - ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH --disable-zipfs "--prefix=$HOME/install dir" || { - cat config.log - echo "::error::Failure during Configure" - exit 1 - } - - name: Build - run: | - make binaries libraries || { - echo "::error::Failure during Build" - exit 1 - } - - name: Build Test Harness - run: | - make tktest || { - echo "::error::Failure during Build" - exit 1 - } - - name: Test-Drive Installation - run: | - make install || { - echo "::error::Failure during Install" - exit 1 - } - - name: Create Distribution Package - run: | - make dist || { - echo "::error::Failure during Distribute" - exit 1 - } - - name: Convert Documentation to HTML - run: | - make html-tk TOOL_DIR=$TOOL_DIR || { - echo "::error::Failure during Distribute" - exit 1 - } - test: - runs-on: ubuntu-22.04 - strategy: - matrix: - compiler: - - "gcc" - cfgopt: - - "" - - "--disable-xft" - - "--enable-symbols" - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: tk - - name: Checkout Tcl - uses: actions/checkout@v4 - with: - repository: tcltk/tcl - ref: core-8-6-branch - path: tcl - - name: Setup Environment (compiler=${{ matrix.compiler }}) - run: | - sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev - mkdir "$HOME/install dir" - touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV - echo "CC=$COMPILER" >> $GITHUB_ENV - working-directory: "." - env: - CFGOPT: ${{ matrix.cfgopt }} - COMPILER: ${{ matrix.compiler }} - - name: Configure and Build Tcl - run: | - ./configure $CFGOPT "--prefix=$HOME/install dir" || { - cat config.log - echo "::warning::Failure during Tcl Configure" - exit 1 - } - make all install || { - echo "::warning::Failure during Tcl Build" - exit 1 - } - echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV - working-directory: tcl/unix - - name: Configure ${{ matrix.cfgopt }} - run: | - ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { - cat config.log - echo "::error::Failure during Configure" - exit 1 - } - - name: Build - run: | - make binaries libraries tktest || { - echo "::error::Failure during Build" - exit 1 - } - - name: Run Tests - run: | - xvfb-run --auto-servernum make test-classic | tee out-classic.txt - xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt - grep -q "Failed 0" out-classic.txt || { - echo "::error::Failure during Test" - exit 1 - } - grep -q "Failed 0" out-ttk.txt || { - echo "::error::Failure during Test" - exit 1 - } - timeout-minutes: 15 diff --git a/.github/workflows/linux-with-tcl9-build.yml b/.github/workflows/linux-with-tcl87-build.yml index ccff18c..557b0e9 100644 --- a/.github/workflows/linux-with-tcl9-build.yml +++ b/.github/workflows/linux-with-tcl87-build.yml @@ -1,4 +1,4 @@ -name: Linux (with Tcl 9.0) +name: Linux (with Tcl 8.7) on: push: branches: @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: main + ref: core-8-branch path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | @@ -124,7 +124,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: main + ref: core-8-branch path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 770133b..0dc2bc7 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -23,11 +23,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Check out Tcl 8.7 + - name: Check out Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Prepare checked out repositories run: | @@ -75,11 +75,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Check out Tcl 8.7 + - name: Check out Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Prepare checked out repositories env: diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 2521afa..37f4895 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -24,11 +24,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Setup Environment run: | @@ -58,7 +58,7 @@ jobs: # TODO: need the Tk version separately for distro naming below - name: Package run: | - cp bin/wish8.7 ${BUILD_NAME} + cp bin/wish9.0 ${BUILD_NAME} chmod +x ${BUILD_NAME} tar -cf ${BUILD_NAME}.tar ${BUILD_NAME} working-directory: ${{ env.INST_DIR }} @@ -88,11 +88,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Checkout create-dmg uses: actions/checkout@v4 @@ -176,11 +176,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Setup Environment run: | diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 9576487..851774f 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -29,11 +29,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Init MSVC uses: ilammy/msvc-dev-cmd@v1 @@ -118,11 +118,11 @@ jobs: install: git mingw-w64-x86_64-toolchain make zip - name: Checkout Tk uses: actions/checkout@v4 - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Prepare run: | @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>tk8.7</name> + <name>tk9.0</name> <comment></comment> <projects> </projects> diff --git a/.travis.yml b/.travis.yml index 7268340..1767ecb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ addons: - libnotify-dev - libglib2.0-dev - libxss-dev - - libxft-dev - xvfb homebrew: packages: @@ -1,6 +1,6 @@ # README: Tk -This is the **Tk 8.7a6** source distribution. +This is the **Tk 9.0b1** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). @@ -25,7 +25,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.7 Web page](https://www.tcl-lang.org/software/tcltk/8.7.html) +this release, see [the Tcl/Tk 9.0 Web page](https://www.tcl-lang.org/software/tcltk/9.0.html) or refer to the "changes" file in this directory, which contains a historical record of all changes to Tk. diff --git a/doc/BindTable.3 b/doc/BindTable.3 index 1d3a85b..af2c8c5 100644 --- a/doc/BindTable.3 +++ b/doc/BindTable.3 @@ -55,7 +55,7 @@ X event to match against bindings in \fIbindingTable\fR. .AP Tk_Window tkwin in Identifier for any window on the display where the event occurred. Used to find display-related information such as key maps. -.AP int numObjects in +.AP Tcl_Size numObjects in Number of object identifiers pointed to by \fIobjectPtr\fR. .AP "void **" objectPtr in Points to an array of object identifiers: bindings will be considered diff --git a/doc/CanvPsY.3 b/doc/CanvPsY.3 index 1e4e320..3678085 100644 --- a/doc/CanvPsY.3 +++ b/doc/CanvPsY.3 @@ -30,7 +30,7 @@ int int \fBTk_CanvasPsStipple\fR(\fIinterp, canvas, bitmap\fR) .SH ARGUMENTS -.AS int "numPoints" +.AS Tcl_Size "numPoints" .AP Tk_Canvas canvas in A token that identifies a canvas widget for which Postscript is being generated. @@ -58,7 +58,7 @@ Pointer to an array of coordinates for one or more points specified in canvas coordinates. The order of values in \fIcoordPtr\fR is x1, y1, x2, y2, x3, y3, and so on. -.AP int numPoints in +.AP Tcl_Size numPoints in Number of points at \fIcoordPtr\fR. .BE .SH DESCRIPTION diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3 index 58712db..09e4df0 100644 --- a/doc/ConfigWidg.3 +++ b/doc/ConfigWidg.3 @@ -15,7 +15,7 @@ Tk_ConfigureWidget, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- proce \fB#include <tk.h>\fR .sp int -\fBTk_ConfigureWidget(\fIinterp, tkwin, specs, argc, argv, widgRec, flags\fB)\fR +\fBTk_ConfigureWidget(\fIinterp, tkwin, specs, objc, objv, widgRec, flags\fB)\fR .sp int \fBTk_ConfigureInfo(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR @@ -33,9 +33,9 @@ Window used to represent widget (needed to set up X resources). .AP "const Tk_ConfigSpec" *specs in Pointer to table specifying legal configuration options for this widget. -.AP int argc in -Number of arguments in \fIargv\fR. -.AP "const char" **argv in +.AP Tcl_Size objc in +Number of arguments in \fIobjv\fR. +.AP "Tcl_Obj *const *" objv in Command-line options for configuring widget. .AP char *widgRec in/out Points to widget record structure. Fields in this structure get @@ -75,16 +75,16 @@ It is typically invoked when widgets are created, and again when the \fBconfigure\fR command is invoked for a widget. Although intended primarily for widgets, \fBTk_ConfigureWidget\fR -can be used in other situations where \fIargc-argv\fR information +can be used in other situations where \fIobjc-objv\fR information is to be used to fill in a record structure, such as configuring graphical elements for a canvas widget or entries of a menu. .PP \fBTk_ConfigureWidget\fR processes a table specifying the configuration options that are supported -(\fIspecs\fR) and a collection of command-line arguments (\fIargc\fR and -\fIargv\fR) to fill in fields of a record (\fIwidgRec\fR). +(\fIspecs\fR) and a collection of command-line arguments (\fIobjc\fR and +\fIobjv\fR) to fill in fields of a record (\fIwidgRec\fR). It uses the option database and defaults specified in \fIspecs\fR -to fill in fields of \fIwidgRec\fR that are not specified in \fIargv\fR. +to fill in fields of \fIwidgRec\fR that are not specified in \fIobjv\fR. \fBTk_ConfigureWidget\fR normally returns the value \fBTCL_OK\fR; in this case it does not modify \fIinterp\fR. If an error @@ -120,12 +120,12 @@ The \fIargvName\fR field is a string such as .QW \-font or .QW \-bg , -which is compared with the values in \fIargv\fR (if \fIargvName\fR is +which is compared with the values in \fIobjv\fR (if \fIargvName\fR is NULL it means this is a grouped entry; see \fBGROUPED ENTRIES\fR below). The \fIdbName\fR and \fIdbClass\fR fields are used to look up a value for this option in the option database. The \fIdefValue\fR field specifies a default value for this configuration option if no -value is specified in either \fIargv\fR or the option database. +value is specified in either \fIobjv\fR or the option database. \fIOffset\fR indicates where in \fIwidgRec\fR to store information about this option, and \fIspecFlags\fR contains additional information to control the processing of this configuration option (see FLAGS @@ -133,14 +133,14 @@ below). The last field, \fIcustomPtr\fR, is only used if \fItype\fR is \fBTK_CONFIG_CUSTOM\fR; see CUSTOM OPTION TYPES below. .PP -\fBTk_ConfigureWidget\fR first processes \fIargv\fR to see which +\fBTk_ConfigureWidget\fR first processes \fIobjv\fR to see which (if any) configuration options are specified there. \fIArgv\fR must contain an even number of fields; the first of each pair of fields must match the \fIargvName\fR of some entry in \fIspecs\fR (unique abbreviations are acceptable), and the second field of the pair contains the value for that configuration option. If there are entries in \fIspec\fR for which -there were no matching entries in \fIargv\fR, +there were no matching entries in \fIobjv\fR, \fBTk_ConfigureWidget\fR uses the \fIdbName\fR and \fIdbClass\fR fields of the \fIspecs\fR entry to probe the option database; if a value is found, then it is used as the value for the option. @@ -149,7 +149,7 @@ Finally, if no entry is found in the option database, the value for the configuration option. If the \fIdefValue\fR is NULL, or if the \fBTK_CONFIG_DONT_SET_DEFAULT\fR bit is set in \fIflags\fR, then there is no default value and this \fIspecs\fR entry -will be ignored if no value is specified in \fIargv\fR or the +will be ignored if no value is specified in \fIobjv\fR or the option database. .PP Once a string value has been determined for a configuration option, @@ -333,13 +333,13 @@ freed by passing it to \fBTcl_Free\fR. .TP \fBTK_CONFIG_SYNONYM\fR This \fItype\fR value identifies special entries in \fIspecs\fR that -are synonyms for other entries. If an \fIargv\fR value matches the +are synonyms for other entries. If an \fIobjv\fR value matches the \fIargvName\fR of a \fBTK_CONFIG_SYNONYM\fR entry, the entry is not used directly. Instead, \fBTk_ConfigureWidget\fR searches \fIspecs\fR for another entry whose \fIargvName\fR is the same as the \fIdbName\fR field in the \fBTK_CONFIG_SYNONYM\fR entry; this new entry is used just -as if its \fIargvName\fR had matched the \fIargv\fR value. The -synonym mechanism allows multiple \fIargv\fR values to be used for +as if its \fIargvName\fR had matched the \fIobjv\fR value. The +synonym mechanism allows multiple \fIobjv\fR values to be used for a single configuration option, such as .QW \-background and @@ -384,7 +384,7 @@ First, if the \fIflags\fR argument to \fBTk_ConfigureWidget\fR has the \fBTK_CONFIG_ARGV_ONLY\fR bit set (i.e., \fIflags\fR | \fBTK_CONFIG_ARGV_ONLY\fR != 0), then the option database and \fIdefValue\fR fields are not used. In this case, if an entry in -\fIspecs\fR does not match a field in \fIargv\fR then nothing happens: +\fIspecs\fR does not match a field in \fIobjv\fR then nothing happens: the corresponding target is not modified. This feature is useful when the goal is to modify certain configuration options while leaving others in their current state, such as when a \fBconfigure\fR @@ -429,14 +429,6 @@ to process the default string: the client can compute the default once, save the value, and provide it before calling \fBTk_ConfigureWidget\fR. .TP -\fBTK_CONFIG_OPTION_SPECIFIED\fR -This bit is -deprecated. It used to be set and cleared by \fBTk_ConfigureWidget\fR -so that callers could detect what entries were specified in -\fIargv\fR, but it was removed because it was inherently -thread-unsafe. Code that wishes to detect what options were specified -should use \fBTk_SetOptions\fR instead. -.PP The \fBTK_CONFIG_MONO_ONLY\fR and \fBTK_CONFIG_COLOR_ONLY\fR flags are typically used to specify different default values for monochrome and color displays. This is done by creating two @@ -545,13 +537,13 @@ typedef int \fBTk_OptionParseProc\fR( Tk_Window \fItkwin\fR, char *\fIvalue\fR, char *\fIwidgRec\fR, - int \fIoffset\fR); + Tcl_Size \fIoffset\fR); typedef const char *\fBTk_OptionPrintProc\fR( void *\fIclientData\fR, Tk_Window \fItkwin\fR, char *\fIwidgRec\fR, - int \fIoffset\fR, + Tcl_Size \fIoffset\fR, Tcl_FreeProc **\fIfreeProcPtr\fR); .CE The Tk_CustomOption structure contains three fields, which are pointers diff --git a/doc/CrtImgType.3 b/doc/CrtImgType.3 index b15a851..f59a78e 100644 --- a/doc/CrtImgType.3 +++ b/doc/CrtImgType.3 @@ -9,7 +9,7 @@ .so man.macros .BS .SH NAME -Tk_CreateImageType, Tk_GetImageModelData, Tk_InitImageArgs \- define new kind of image +Tk_CreateImageType, Tk_GetImageModelData \- define new kind of image .SH SYNOPSIS .nf \fB#include <tk.h>\fR @@ -18,8 +18,6 @@ Tk_CreateImageType, Tk_GetImageModelData, Tk_InitImageArgs \- define new kind of .sp void * \fBTk_GetImageModelData\fR(\fIinterp, name, typePtrPtr\fR) -.sp -\fBTk_InitImageArgs\fR(\fIinterp, argc, argvPtr\fR) .SH ARGUMENTS .AS "const Tk_ImageType" *typePtrPtr .AP "const Tk_ImageType" *typePtr in @@ -34,8 +32,6 @@ Name of existing image. .AP Tk_ImageType **typePtrPtr out Points to word in which to store a pointer to type information for the given image, if it exists. -.AP int argc in -Number of arguments .AP char ***argvPtr in/out Pointer to argument list .BE @@ -241,42 +237,6 @@ and the return value is the clientData value returned by the \fIcreateProc\fR when the image was created (this is typically a pointer to the image model data structure). If no such image exists then NULL is returned and NULL is stored at \fI*typePtrPtr\fR. -.SH "LEGACY INTERFACE SUPPORT" -.PP -In Tk 8.2 and earlier, the definition of \fBTk_ImageCreateProc\fR -was incompatibly different, with the following prototype: -.CS -typedef int \fBTk_ImageCreateProc\fR( - Tcl_Interp *\fIinterp\fR, - char *\fIname\fR, - int \fIargc\fR, - char **\fIargv\fR, - Tk_ImageType *\fItypePtr\fR, - Tk_ImageModel \fImodel\fR, - void **\fImodelDataPtr\fR); -.CE -Legacy programs and libraries dating from those days may still -contain code that defines extended Tk image types using the old -interface. The Tk header file will still support this legacy -interface if the code is compiled with the macro \fBUSE_OLD_IMAGE\fR -defined. -.PP -When the \fBUSE_OLD_IMAGE\fR legacy support is enabled, you may -see the routine \fBTk_InitImageArgs\fR in use. This was a migration -tool used to create stub-enabled extensions that could be loaded -into interps containing all versions of Tk 8.1 and later. Tk 8.5 no longer -provides this routine, but uses a macro to convert any attempted -calls of this routine into an empty comment. Any stub-enabled -extension providing an extended image type via the legacy interface -that is compiled against Tk 8.5 headers and linked against the -Tk 8.5 stub library will produce a file that can be loaded only -into interps with Tk 8.5 or later; that is, the normal stub-compatibility -rules. If a developer needs to generate from such code a file -that is loadable into interps with Tk 8.4 or earlier, they must -use Tk 8.4 headers and stub libraries to do so. -.PP -Any new code written today should not make use of the legacy -interfaces. Expect their support to go away in Tk 9. .SH "SEE ALSO" Tk_ImageChanged, Tk_GetImage, Tk_FreeImage, Tk_RedrawImage, Tk_SizeOfImage .SH KEYWORDS diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3 index 82fc26e..85320d6 100644 --- a/doc/CrtItemType.3 +++ b/doc/CrtItemType.3 @@ -71,7 +71,7 @@ typedef struct Tk_ItemType { Tk_ItemCoordProc *\fIcoordProc\fR; Tk_ItemDeleteProc *\fIdeleteProc\fR; Tk_ItemDisplayProc *\fIdisplayProc\fR; - int \fIalwaysRedraw\fR; + int \fIflags\fR; Tk_ItemPointProc *\fIpointProc\fR; Tk_ItemAreaProc *\fIareaProc\fR; Tk_ItemPostscriptProc *\fIpostscriptProc\fR; @@ -169,7 +169,7 @@ If there already existed an item type by this name then the new item type replaces the old one. .SS "FLAGS (IN ALWAYSREDRAW)" .PP -The \fItypePtr\->alwaysRedraw\fR field (so named for historic reasons) +The \fItypePtr\->flags\fR field contains a collection of flag bits that modify how the canvas core interacts with the item. The following bits are defined: .TP @@ -180,14 +180,6 @@ is redrawn, rather than only when the bounding box of the item overlaps the area being redrawn. This is used by window items, for example, which need to unmap subwindows that are not on the screen. .TP -\fBTK_CONFIG_OBJS\fR -. -Indicates that operations which would otherwise take a string (or array of -strings) actually take a Tcl_Obj reference (or an array of such references). -The operations to which this applies are the \fIconfigProc\fR, the -\fIcoordProc\fR, the \fIcreateProc\fR, the \fIindexProc\fR and the -\fIinsertProc\fR. -.TP \fBTK_MOVABLE_POINTS\fR .VS 8.6 Indicates that the item supports the \fIdCharsProc\fR, \fIindexProc\fR and @@ -229,9 +221,6 @@ Tk has already initialized the item's header (the first The \fIobjc\fR and \fIobjv\fR arguments describe all of the arguments to the \fBcreate\fR command after the \fItype\fR argument. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually -contain a pointer to an array of constant strings. For example, in the widget command: .PP .CS @@ -285,9 +274,6 @@ The \fIinterp\fR argument identifies the interpreter in which the widget command was invoked, \fIcanvas\fR is a handle for the canvas widget, and \fIitemPtr\fR is a pointer to the item being configured. \fIobjc\fR and \fIobjv\fR contain the configuration options. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually -contain a pointer to an array of constant strings. For example, if the following command is invoked: .PP .CS @@ -324,9 +310,6 @@ typedef int \fBTk_ItemCoordProc\fR( The arguments \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR all have the standard meanings, and \fIobjc\fR and \fIobjv\fR describe the coordinate arguments. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually -contain a pointer to an array of constant strings. For example, if the following widget command is invoked: .PP .CS @@ -401,9 +384,9 @@ of \fIdst\fR. .PP Normally an item's \fIdisplayProc\fR is only invoked if the item overlaps the area being displayed. -However, if bit zero of \fItypePtr\->alwaysRedraw\fR is 1, +However, if bit zero of \fItypePtr\->flags\fR is 1, (i.e.\| -.QW "\fItypePtr\->alwaysRedraw & 1 == 1\fR" ) +.QW "\fItypePtr\->flags & 1 == 1\fR" ) then \fIdisplayProc\fR is invoked during every redisplay operation, even if the item does not overlap the area of redisplay; this is useful for cases such as window items, where the subwindow needs to be unmapped when it @@ -616,9 +599,6 @@ have the usual meaning. \fIindexObj\fR contains a textual description of an index, and \fIindexPtr\fR points to an integer value that should be filled in with a numerical index. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIindexObj\fR parameter will -actually contain a pointer to a constant string. It is up to the type manager to decide what forms of index are supported (e.g., numbers, \fBinsert\fR, \fBsel.first\fR, \fBend\fR, etc.). @@ -702,9 +682,6 @@ typedef void \fBTk_ItemInsertProc\fR( previous call to \fItypePtr\->insertProc\fR, and \fIobj\fR contains new text to insert just before the character given by \fIindex\fR. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobj\fR parameter will -actually contain a pointer to a constant string to be inserted. If the item supports modification of the coordinates list by this .PP The type manager should insert the text and recompute the bounding diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3 index c7accdb..03a4046 100644 --- a/doc/CrtPhImgFmt.3 +++ b/doc/CrtPhImgFmt.3 @@ -457,45 +457,6 @@ typedef int \fBTk_ImageStringWriteProc\fR( Tcl_Obj *\fIformat\fR, Tk_PhotoImageBlock *\fIblockPtr\fR); .CE -.PP -.SH "LEGACY INTERFACE SUPPORT" -.PP -In Tk 8.2 and earlier, the definition of all the function pointer -types stored in fields of a \fBTk_PhotoImageFormat\fR struct were -incompatibly different. Legacy programs and libraries dating from -those days may still contain code that defines extended Tk photo image -formats using the old interface. The Tk header file will still support -this legacy interface if the code is compiled with the -macro \fBUSE_OLD_IMAGE\fR defined. Alternatively, the legacy interfaces -are used if the first character of \fIformatPtr->name\fR is an -uppercase ASCII character (\fBA\fR-\fBZ\fR), and explicit casts -are used to forgive the type mismatch. For example, -.CS -static Tk_PhotoImageFormat myFormat = { - "MyFormat", - (Tk_ImageFileMatchProc *) FileMatch, - NULL, - (Tk_ImageFileReadProc *) FileRead, - NULL, - NULL, - NULL -}; -.CE -would define a minimal \fBTk_PhotoImageFormat\fR that operates provide -only file reading capability, where \fBFileMatch\fR and \fBFileRead\fR -are written according to the legacy interfaces of Tk 8.2 or earlier. -.PP -Any stub-enabled extension providing an extended photo image format -via the legacy interface enabled by the \fBUSE_OLD_IMAGE\fR macro -that is compiled against Tk 8.5 headers and linked against the -Tk 8.5 stub library will produce a file that can be loaded only -into interps with Tk 8.5 or later; that is, the normal stub-compatibility -rules. If a developer needs to generate from such code a file -that is loadable into interps with Tk 8.4 or earlier, they must -use Tk 8.4 headers and stub libraries to do so. -.PP -Any new code written today should not make use of the legacy -interfaces. Expect their support to go away in Tk 9. .SH "SEE ALSO" Tk_FindPhoto, Tk_PhotoPutBlock .SH KEYWORDS diff --git a/doc/CrtSelHdlr.3 b/doc/CrtSelHdlr.3 index b3c749c..d6d27bb 100644 --- a/doc/CrtSelHdlr.3 +++ b/doc/CrtSelHdlr.3 @@ -54,11 +54,11 @@ the selection. The most common form is STRING. \fIProc\fR should have arguments and result that match the type \fBTk_SelectionProc\fR: .CS -typedef int \fBTk_SelectionProc\fR( +typedef Tcl_Size \fBTk_SelectionProc\fR( void *\fIclientData\fR, - int \fIoffset\fR, + Tcl_Size \fIoffset\fR, char *\fIbuffer\fR, - int \fImaxBytes\fR); + Tcl_Size \fImaxBytes\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTk_CreateSelHandler\fR. diff --git a/doc/FreeXId.3 b/doc/FreeXId.3 deleted file mode 100644 index 84fef26..0000000 --- a/doc/FreeXId.3 +++ /dev/null @@ -1,30 +0,0 @@ -'\" -'\" Copyright (c) 1990 The Regents of the University of California. -'\" Copyright (c) 1994-1996 Sun Microsystems, Inc. -'\" -'\" 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 -.SH NAME -Tk_FreeXId \- make X resource identifier available for reuse -.SH SYNOPSIS -.nf -\fB#include <tk.h>\fR -.sp -\fBTk_FreeXId(\fIdisplay, id\fB)\fR -.SH ARGUMENTS -.AS Display *display out -.AP Display *display in -Display for which \fIid\fR was allocated. -.AP XID id in -Identifier of X resource (window, font, pixmap, cursor, graphics -context, or colormap) that is no longer in use. -.BE -.SH DESCRIPTION -.PP -This function is deprecated, it doesn't do anything since 2008-08-19. -.SH KEYWORDS -resource identifier diff --git a/doc/GetScroll.3 b/doc/GetScroll.3 index 91a2585..dc929b7 100644 --- a/doc/GetScroll.3 +++ b/doc/GetScroll.3 @@ -23,7 +23,7 @@ int .AS "Tcl_Interp" *fractionPtr .AP Tcl_Interp *interp in Interpreter to use for error reporting. -.AP int objc in +.AP Tcl_Size objc in Number of Tcl_Obj's in \fIobjv\fR array. .AP "Tcl_Obj *const *" objv in Argument objects. These represent the entire widget command, of diff --git a/doc/MeasureChar.3 b/doc/MeasureChar.3 index 3959978..0922fd5 100644 --- a/doc/MeasureChar.3 +++ b/doc/MeasureChar.3 @@ -33,7 +33,7 @@ Text to be measured or displayed. Need not be null terminated. Any non-printing meta-characters in the string (such as tabs, newlines, and other control characters) will be measured or displayed in a platform-dependent manner. -.AP int numBytes in +.AP Tcl_Size numBytes in The maximum number of bytes to consider when measuring or drawing \fIstring\fR. Must be greater than or equal to 0. .AP int maxPixels in diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index 60730fe..bdf502f 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -58,7 +58,7 @@ For options such as \fBTK_OPTION_COLOR\fR, this argument indicates the window in which the option will be used. If \fIoptionTable\fR uses no window-dependent options, then a NULL value may be supplied for this argument. -.AP int objc in +.AP Tcl_Size objc in Number of values in \fIobjv\fR. .AP Tcl_Obj "*const *objv" in Command-line arguments for setting configuring options. diff --git a/doc/TextLayout.3 b/doc/TextLayout.3 index 7df0685..335ab39 100644 --- a/doc/TextLayout.3 +++ b/doc/TextLayout.3 @@ -100,10 +100,10 @@ Point, in pixels, at which to place the upper-left hand corner of the text layout when it is being drawn, or the coordinates of a point (with respect to the upper-left hand corner of the text layout) to check against the text layout. -.AP int firstChar in +.AP Tcl_Size firstChar in The index of the first character to draw from the given text layout. The number 0 means to draw from the beginning. -.AP int lastChar in +.AP Tcl_Size lastChar in The index of the last character up to which to draw. The character specified by \fIlastChar\fR itself will not be drawn. A number less than 0 means to draw all characters in the text layout. @@ -111,7 +111,7 @@ than 0 means to draw all characters in the text layout. Index of the single character to underline in the text layout, or a negative number counting backwards from the end of the string. Any out-of-range number (e.g. INT_MIN) means no underline. -.AP int index in +.AP Tcl_Size index in The index of the character whose bounding box is desired. The bounding box is computed with respect to the upper-left hand corner of the text layout. .AP int "*xPtr, *yPtr" out diff --git a/doc/Tk_Main.3 b/doc/Tk_Main.3 index ea5f771..a1e12ce 100644 --- a/doc/Tk_Main.3 +++ b/doc/Tk_Main.3 @@ -17,7 +17,7 @@ Tk_Main \- main program for Tk-based applications \fBTk_Main\fR(\fIargc, argv, appInitProc\fR) .SH ARGUMENTS .AS Tcl_AppInitProc *appInitProc -.AP int argc in +.AP Tcl_Size argc in Number of elements in \fIargv\fR. .AP char *argv[] in Array of strings containing command-line arguments. On Windows, when diff --git a/doc/ttk_panedwindow.n b/doc/ttk_panedwindow.n index beab063..a6a809b 100644 --- a/doc/ttk_panedwindow.n +++ b/doc/ttk_panedwindow.n @@ -132,7 +132,7 @@ are: .br \fB\-bordercolor\fP \fIcolor\fP .br -\fB\-gripcount\fP \fIcount\fP +\fB\-gripsize\fP \fIsize\fP (number of screen units) .br \fB\-handlepad\fP \fIamount\fP .br diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n index 948c6eb..bd38a5c 100644 --- a/doc/ttk_scrollbar.n +++ b/doc/ttk_scrollbar.n @@ -166,7 +166,7 @@ Dynamic states: \fBactive\fP, \fBdisabled\fP. .br \fB\-foreground\fP \fIcolor\fP .br -\fB\-gripcount\fP \fIcount\fP (number of lines on the thumb) +\fB\-gripsize\fP \fIsize\fP (number of screen units) .br \fB\-lightcolor\fP \fIcolor\fP (color of the light part of the 3D relief) .br diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n index 757be86..c819093 100644 --- a/doc/ttk_treeview.n +++ b/doc/ttk_treeview.n @@ -233,6 +233,13 @@ but will not be displayed until that is done. The root item may not be detached. See also: \fBdelete\fR. .TP +\fIpathname \fBdetached \fR?\fIitem\fR? +. +If \fIitem\fR is provided, returns a boolean value indicating whether it is +the name of a detached item (see \fBdetach\fR). Otherwise, returns a list of +all the detached items (in an arbitrary order). The root item is never +detached. +.TP \fIpathname \fBexists \fIitem\fR Returns 1 if the specified \fIitem\fR is present in the tree, 0 otherwise. diff --git a/generic/tk.decls b/generic/tk.decls index d3aaa6d..d1b5ffb 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -146,7 +146,7 @@ declare 28 { declare 29 { int Tk_ConfigureWidget(Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, - Tcl_Size argc, const char **argv, void *widgRec, + Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags) } declare 30 { @@ -326,9 +326,6 @@ declare 75 { declare 76 { void Tk_FreeTextLayout(Tk_TextLayout textLayout) } -declare 77 {deprecated {function does nothing, call can be removed}} { - void Tk_FreeXId(Display *display, XID xid) -} declare 78 { GC Tk_GCForColor(XColor *colorPtr, Drawable drawable) } @@ -475,9 +472,6 @@ declare 117 { void Tk_ImageChanged(Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight) } -declare 118 { - int Tk_Init(Tcl_Interp *interp) -} declare 119 { Atom Tk_InternAtom(Tk_Window tkwin, const char *name) } @@ -564,32 +558,15 @@ declare 143 { Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags) } -declare 144 {deprecated {function signature changed}} { - void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height) -} -declare 145 {deprecated {function signature changed}} { - void Tk_PhotoPutZoomedBlock_NoComposite(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY) -} declare 146 { int Tk_PhotoGetImage(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr) } declare 147 { void Tk_PhotoBlank(Tk_PhotoHandle handle) } -declare 148 {deprecated {function signature changed}} { - void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle, int width, int height ) -} declare 149 { void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr) } -declare 150 {deprecated {function signature changed}} { - void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle, int width, int height) -} declare 151 { int Tk_PointToChar(Tk_TextLayout layout, int x, int y) } @@ -617,9 +594,6 @@ declare 158 { Tk_RestrictProc *Tk_RestrictEvents(Tk_RestrictProc *proc, void *arg, void **prevArgPtr) } -declare 159 { - int Tk_SafeInit(Tcl_Interp *interp) -} declare 160 { const char *Tk_SetAppName(Tk_Window tkwin, const char *name) } @@ -805,10 +779,6 @@ declare 211 { int Tk_InitOptions(Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin) } -declare 212 {nostub {Don't use this function in a stub-enabled extension}} { - void Tk_MainEx(Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc, - Tcl_Interp *interp) -} declare 213 { void Tk_RestoreSavedOptions(Tk_SavedOptions *savePtr) } @@ -821,9 +791,6 @@ declare 214 { declare 215 { void Tk_InitConsoleChannels(Tcl_Interp *interp) } -declare 216 { - int Tk_CreateConsoleWindow(Tcl_Interp *interp) -} declare 217 { void Tk_CreateSmoothMethod(Tcl_Interp *interp, const Tk_SmoothMethod *method) } @@ -943,17 +910,6 @@ declare 244 { declare 245 { void Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height) } -declare 246 {deprecated {function signature changed}} { - void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int compRule) -} -declare 247 {deprecated {function signature changed}} { - void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY, int compRule) -} declare 248 { int Tk_CollapseMotionEvents(Display *display, int collapse) } @@ -989,12 +945,6 @@ declare 256 { declare 257 { Tk_Style Tk_AllocStyleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr) } -declare 258 { - Tk_Style Tk_GetStyleFromObj(Tcl_Obj *objPtr) -} -declare 259 { - void Tk_FreeStyleFromObj(Tcl_Obj *objPtr) -} declare 260 { Tk_StyledElement Tk_GetStyledElement(Tk_Style style, Tcl_Size elementId, Tk_OptionTable optionTable) @@ -1052,23 +1002,6 @@ declare 271 { Tcl_Interp *Tk_Interp(Tk_Window tkwin) } -# Now that the Tk 8.2 -> 8.3 transition is long past, use more conventional -# means to continue support for extensions using the USE_OLD_IMAGE to -# continue use of their string-based Tcl_ImageTypes and Tcl_PhotoImageFormats. -# -# Note that this restores the usual rules for stub compatibility. Stub-enabled -# extensions compiled against 8.5 headers and linked to the 8.5 stub library -# will produce a file [load]able into an interp with Tk 8.X, for X >= 5. -# It will *not* be [load]able into interps with Tk 8.4 (or Tk 8.2!). -# Developers who need to produce a file [load]able into legacy interps must -# build against legacy sources. -declare 272 { - void Tk_CreateOldImageType(const Tk_ImageType *typePtr) -} -declare 273 { - void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr) -} - # TIP#580 declare 274 { int Tk_AlwaysShowSelection(Tk_Window tkwin) @@ -1155,27 +1088,12 @@ declare 2 win { declare 3 win { Tk_Window Tk_HWNDToWindow(HWND hwnd) } -declare 4 win { - void Tk_PointerEvent(HWND hwnd, int x, int y) -} -declare 5 win { - int Tk_TranslateWinEvent(HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result) -} ################################ # Aqua specific functions -# Stub removed because the function no longer exists. -#declare 3 aqua { -# void TkMacOSXInitMenus(Tcl_Interp *interp) -#} declare 4 aqua { void TkMacOSXInitAppleEvents(Tcl_Interp *interp) } -declare 5 aqua { - void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, int width, - int height, int flags) -} declare 6 aqua { void TkMacOSXInvalClipRgns(Tk_Window tkwin) } diff --git a/generic/tk.h b/generic/tk.h index 6a5df0d..eae1b22 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -17,8 +17,8 @@ #define _TK #include <tcl.h> -#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6) -# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better +#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7) +# error Tk 9.0 must be compiled with tcl.h from Tcl 8.7 or better #endif #ifndef EXTERN @@ -66,17 +66,16 @@ extern "C" { */ #ifndef TK_MAJOR_VERSION -# define TK_MAJOR_VERSION 8 +# define TK_MAJOR_VERSION 9 #endif -#if TK_MAJOR_VERSION != 8 -# error "This header-file is for Tk 8 only" -#endif -#define TK_MINOR_VERSION 7 -#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TK_RELEASE_SERIAL 6 - -#define TK_VERSION "8.7" -#define TK_PATCH_LEVEL "8.7a6" +#if TK_MAJOR_VERSION == 9 +# define TK_MINOR_VERSION 0 +# define TK_RELEASE_LEVEL TCL_BETA_RELEASE +# define TK_RELEASE_SERIAL 0 + +# define TK_VERSION "9.0" +# define TK_PATCH_LEVEL "9.0b1" +#endif /* TK_MAJOR_VERSION */ /* * A special definition used to allow this header file to be included from @@ -146,15 +145,6 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement; */ typedef const char *Tk_Uid; - -#if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7) -# ifndef Tcl_Size -# define Tcl_Size int -# endif -# define TCL_SIZE_MAX INT_MAX -# define TCL_SIZE_MODIFIER "" -# define TCL_ENCODING_PROFILE_TCL8 0x01000000 -#endif /* *---------------------------------------------------------------------- @@ -278,15 +268,6 @@ typedef struct Tk_ObjCustomOption { } Tk_ObjCustomOption; /* - * Macro to use to fill in "offset" fields of the Tk_OptionSpec structure. - * Computes number of bytes from beginning of structure to a given field. - */ - -#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) && !defined(BUILD_tk) -# define Tk_Offset(type, field) ((int) offsetof(type, field)) -#endif - -/* * The following two structures are used for error handling. When config * options are being modified, the old values are saved in a Tk_SavedOptions * structure. If an error occurs, then the contents of the structure can be @@ -428,9 +409,6 @@ typedef enum { #define TK_CONFIG_COLOR_ONLY (1 << 1) #define TK_CONFIG_MONO_ONLY (1 << 2) #define TK_CONFIG_DONT_SET_DEFAULT (1 << 3) -#ifndef TK_NO_DEPRECATED -# define TK_CONFIG_OPTION_SPECIFIED (1 << 4) -#endif /* !TK_NO_DEPRECATED */ #define TK_CONFIG_USER_BIT 0x100 #endif /* __NO_OLD_CONFIG */ @@ -767,10 +745,6 @@ typedef XActivateDeactivateEvent XDeactivateEvent; (((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE) #define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) #define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) -#ifndef TK_NO_DEPRECATED -#define Tk_InternalBorderWidth(tkwin) \ - (((Tk_FakeWin *) (tkwin))->internalBorderLeft) -#endif /* !TK_NO_DEPRECATED */ #define Tk_InternalBorderLeft(tkwin) \ (((Tk_FakeWin *) (tkwin))->internalBorderLeft) #define Tk_InternalBorderRight(tkwin) \ @@ -1023,18 +997,6 @@ typedef struct Tk_Item { * lines, circles, etc.) that can form part of a canvas widget. */ -#if defined(USE_OLD_CANVAS) && TCL_MAJOR_VERSION < 9 -typedef int (Tk_ItemCreateProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, Tcl_Size argc, char **argv); -typedef int (Tk_ItemConfigureProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, Tcl_Size argc, char **argv, int flags); -typedef int (Tk_ItemCoordProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, Tcl_Size argc, char **argv); -typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr, - int beforeThis, char *string); -typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, char *indexString, int *indexPtr); -#else typedef int (Tk_ItemCreateProc)(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Size objc, Tcl_Obj *const objv[]); typedef int (Tk_ItemConfigureProc)(Tcl_Interp *interp, Tk_Canvas canvas, @@ -1046,7 +1008,6 @@ typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Size beforeThis, Tcl_Obj *string); typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Obj *indexString, Tcl_Size *indexPtr); -#endif /* USE_OLD_CANVAS */ typedef void (Tk_ItemDeleteProc)(Tk_Canvas canvas, Tk_Item *itemPtr, Display *display); typedef void (Tk_ItemDisplayProc)(Tk_Canvas canvas, Tk_Item *itemPtr, @@ -1095,9 +1056,7 @@ typedef struct Tk_ItemType { * type. */ Tk_ItemDisplayProc *displayProc; /* Procedure to display items of this type. */ - int alwaysRedraw; /* Non-zero means displayProc should be called - * even when the item has been moved - * off-screen. */ + int flags; /* Combination of TK_ALWAYS_REDRAW/TK_MOVABLE_POINTS */ Tk_ItemPointProc *pointProc;/* Computes distance from item to a given * point. */ Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside, @@ -1134,8 +1093,7 @@ typedef struct Tk_ItemType { } Tk_ItemType; /* - * Flag (used in the alwaysRedraw field) to say whether an item supports - * point-level manipulation like the line and polygon items. + * Possible flags for 'flags' field. */ #define TK_ALWAYS_REDRAW 1 /* item should be redrawn always*/ @@ -1250,15 +1208,9 @@ typedef struct Tk_Outline { */ typedef struct Tk_ImageType Tk_ImageType; -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 && defined(USE_OLD_IMAGE) -typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, char *name, Tcl_Size argc, - char **argv, Tk_ImageType *typePtr, Tk_ImageModel model, - void **clientDataPtr); -#else typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, const char *name, Tcl_Size objc, Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageModel model, void **clientDataPtr); -#endif /* USE_OLD_IMAGE */ typedef void *(Tk_ImageGetProc) (Tk_Window tkwin, void *clientData); typedef void (Tk_ImageDisplayProc) (void *clientData, Display *display, Drawable drawable, int imageX, int imageY, int width, int height, @@ -1353,22 +1305,6 @@ typedef struct Tk_PhotoImageBlock { */ typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; -#ifdef USE_OLD_IMAGE -typedef int (Tk_ImageFileMatchProc) (Tcl_Channel chan, char *fileName, - char *formatString, int *widthPtr, int *heightPtr); -typedef int (Tk_ImageStringMatchProc) (char *string, char *formatString, - int *widthPtr, int *heightPtr); -typedef int (Tk_ImageFileReadProc) (Tcl_Interp *interp, Tcl_Channel chan, - char *fileName, char *formatString, Tk_PhotoHandle imageHandle, - int destX, int destY, int width, int height, int srcX, int srcY); -typedef int (Tk_ImageStringReadProc) (Tcl_Interp *interp, char *string, - char *formatString, Tk_PhotoHandle imageHandle, int destX, int destY, - int width, int height, int srcX, int srcY); -typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, char *fileName, - char *formatString, Tk_PhotoImageBlock *blockPtr); -typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, - Tcl_DString *dataPtr, char *formatString, Tk_PhotoImageBlock *blockPtr); -#else typedef int (Tk_ImageFileMatchProc) (Tcl_Channel chan, const char *fileName, Tcl_Obj *format, int *widthPtr, int *heightPtr, Tcl_Interp *interp); typedef int (Tk_ImageStringMatchProc) (Tcl_Obj *dataObj, Tcl_Obj *format, @@ -1383,7 +1319,6 @@ typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, const char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr); typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr); -#endif /* USE_OLD_IMAGE */ /* * The following alternate definitions are used with the Tk8.7 file format @@ -1552,48 +1487,11 @@ typedef struct Tk_ElementSpec { *---------------------------------------------------------------------- * * The definitions below provide backward compatibility for functions and - * types related to event handling that used to be in Tk but have moved to - * Tcl. + * types that used to be in Tk but have moved to Tcl. * *---------------------------------------------------------------------- */ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -#define TK_READABLE TCL_READABLE -#define TK_WRITABLE TCL_WRITABLE -#define TK_EXCEPTION TCL_EXCEPTION - -#define TK_DONT_WAIT TCL_DONT_WAIT -#define TK_X_EVENTS TCL_WINDOW_EVENTS -#define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS -#define TK_FILE_EVENTS TCL_FILE_EVENTS -#define TK_TIMER_EVENTS TCL_TIMER_EVENTS -#define TK_IDLE_EVENTS TCL_IDLE_EVENTS -#define TK_ALL_EVENTS TCL_ALL_EVENTS - -#define Tk_IdleProc Tcl_IdleProc -#define Tk_FileProc Tcl_FileProc -#define Tk_TimerProc Tcl_TimerProc -#define Tk_TimerToken Tcl_TimerToken - -#define Tk_BackgroundError Tcl_BackgroundError -#define Tk_CancelIdleCall Tcl_CancelIdleCall -#define Tk_CreateFileHandler Tcl_CreateFileHandler -#define Tk_CreateTimerHandler Tcl_CreateTimerHandler -#define Tk_DeleteFileHandler Tcl_DeleteFileHandler -#define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler -#define Tk_DoOneEvent Tcl_DoOneEvent -#define Tk_DoWhenIdle Tcl_DoWhenIdle -#define Tk_Sleep Tcl_Sleep - -/* Additional stuff that has moved to Tcl: */ - -#define Tk_EventuallyFree Tcl_EventuallyFree -#define Tk_FreeProc Tcl_FreeProc -#define Tk_Preserve Tcl_Preserve -#define Tk_Release Tcl_Release -#endif - /* Removed Tk_Main, use macro instead */ #if defined(_WIN32) || defined(__CYGWIN__) #define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \ @@ -1611,8 +1509,6 @@ EXTERN const char * Tk_PkgInitStubsCheck(Tcl_Interp *interp, #define Tk_InitStubs(interp, version, exact) \ Tk_PkgInitStubsCheck(interp, version, exact) #endif /* USE_TK_STUBS */ - -#define Tk_InitImageArgs(interp, argc, argv) /**/ /* *---------------------------------------------------------------------- @@ -1644,58 +1540,6 @@ typedef Tcl_Size (Tk_SelectionProc) (void *clientData, Tcl_Size offset, #include "tkDecls.h" -#ifdef USE_OLD_IMAGE -#undef Tk_CreateImageType -#define Tk_CreateImageType Tk_CreateOldImageType -#undef Tk_CreatePhotoImageFormat -#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat -#endif /* USE_OLD_IMAGE */ - -/* - *---------------------------------------------------------------------- - * - * Allow users to say that they don't want to alter their source to add extra - * arguments to Tk_PhotoPutBlock() et al. - * - * This goes after the inclusion of the stubbed-decls so that the declarations - * of what is actually there can be correct. - */ - -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK -# ifdef Tk_PhotoPutBlock -# undef Tk_PhotoPutBlock -# endif -# define Tk_PhotoPutBlock Tk_PhotoPutBlock_NoComposite -# ifdef Tk_PhotoPutZoomedBlock -# undef Tk_PhotoPutZoomedBlock -# endif -# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_NoComposite -# define USE_PANIC_ON_PHOTO_ALLOC_FAILURE -#else /* !USE_COMPOSITELESS_PHOTO_PUT_BLOCK */ -# ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE -# ifdef Tk_PhotoPutBlock -# undef Tk_PhotoPutBlock -# endif -# define Tk_PhotoPutBlock Tk_PhotoPutBlock_Panic -# ifdef Tk_PhotoPutZoomedBlock -# undef Tk_PhotoPutZoomedBlock -# endif -# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_Panic -# endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ -#endif /* USE_COMPOSITELESS_PHOTO_PUT_BLOCK */ -#ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE -# ifdef Tk_PhotoExpand -# undef Tk_PhotoExpand -# endif -# define Tk_PhotoExpand Tk_PhotoExpand_Panic -# ifdef Tk_PhotoSetSize -# undef Tk_PhotoSetSize -# endif -# define Tk_PhotoSetSize Tk_PhotoSetSize_Panic -#endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ -#endif /* !TK_NO_DEPRECATED */ - #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/generic/tkBind.c b/generic/tkBind.c index 6c83dd0..2b1caff 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -5300,7 +5300,7 @@ TkStringToKeysym( #endif /* REDO_KEYSYM_LOOKUP */ int keysym; - size_t len = TkUtfToUniChar(name, &keysym); + size_t len = Tcl_UtfToUniChar(name, &keysym); if (name[len] == '\0') { if (!Tcl_UniCharIsPrint(keysym)) { /* This form not supported */ @@ -5384,7 +5384,7 @@ TkKeysymToString( && ((unsigned)(keysym - 0x100007F) > 0x20)) { char buf[10]; if (Tcl_UniCharIsPrint(keysym-0x1000000)) { - buf[TkUniCharToUtf(keysym - 0x1000000, buf)] = '\0'; + buf[Tcl_UniCharToUtf(keysym - 0x1000000, buf)] = '\0'; } else if (keysym >= 0x1010000) { snprintf(buf, sizeof(buf), "U%08X", (int)(keysym - 0x1000000)); } else { diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index a730eb9..a7bcfb3 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -234,7 +234,7 @@ Tk_ItemType tkArcType = { ArcCoords, /* coordProc */ DeleteArc, /* deleteProc */ DisplayArc, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ ArcToPoint, /* pointProc */ ArcToArea, /* areaProc */ ArcToPostscript, /* postscriptProc */ @@ -452,7 +452,7 @@ ConfigureArc( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) arcPtr, flags|TK_CONFIG_OBJS)) { + objv, arcPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index 49e73cb..f2f2ca5 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -128,7 +128,7 @@ Tk_ItemType tkBitmapType = { BitmapCoords, /* coordProc */ DeleteBitmap, /* deleteProc */ DisplayBitmap, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ BitmapToPoint, /* pointProc */ BitmapToArea, /* areaProc */ BitmapToPostscript, /* postscriptProc */ @@ -324,7 +324,7 @@ ConfigureBitmap( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) bmapPtr, flags|TK_CONFIG_OBJS)) { + objv, bmapPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 0d45dcb..9a105d9 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -116,7 +116,7 @@ Tk_ItemType tkImageType = { ImageCoords, /* coordProc */ DeleteImage, /* deleteProc */ DisplayImage, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ ImageToPoint, /* pointProc */ ImageToArea, /* areaProc */ ImageToPostscript, /* postscriptProc */ @@ -302,7 +302,7 @@ ConfigureImage( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) imgPtr, flags|TK_CONFIG_OBJS)) { + objv, imgPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 8f2595f..861c8ba 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -234,7 +234,7 @@ Tk_ItemType tkLineType = { LineCoords, /* coordProc */ DeleteLine, /* deleteProc */ DisplayLine, /* displayProc */ - TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */ + TK_MOVABLE_POINTS, /* flags */ LineToPoint, /* pointProc */ LineToArea, /* areaProc */ LineToPostscript, /* postscriptProc */ @@ -486,7 +486,7 @@ ConfigureLine( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) linePtr, flags|TK_CONFIG_OBJS)) { + objv, linePtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index 3d93afa..f0d6031 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -199,7 +199,7 @@ Tk_ItemType tkPolygonType = { PolygonCoords, /* coordProc */ DeletePolygon, /* deleteProc */ DisplayPolygon, /* displayProc */ - TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */ + TK_MOVABLE_POINTS, /* flags */ PolygonToPoint, /* pointProc */ PolygonToArea, /* areaProc */ PolygonToPostscript, /* postscriptProc */ @@ -446,7 +446,7 @@ ConfigurePolygon( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) polyPtr, flags|TK_CONFIG_OBJS)) { + objv, polyPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index d9759d7..f5b9a8b 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -236,8 +236,8 @@ TkCanvPostscriptObjCmd( psInfo.prolog = 1; psInfo.tkwin = tkwin; Tcl_InitHashTable(&psInfo.fontTable, TCL_STRING_KEYS); - result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, (const char **)objv+2, - (char *) &psInfo, TK_CONFIG_ARGV_ONLY|TK_CONFIG_OBJS); + result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, objv+2, + &psInfo, TK_CONFIG_ARGV_ONLY); if (result != TCL_OK) { goto cleanup; } diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index abc050c..e57e0f1 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -150,11 +150,7 @@ UnderlinePrintProc( char *p; if (underline == INT_MIN) { -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - p = (char *)"-1"; -#else p = (char *)""; -#endif *freeProcPtr = TCL_STATIC; return p; } else if (underline == INT_MAX) { @@ -276,7 +272,7 @@ Tk_ItemType tkTextType = { TextCoords, /* coordProc */ DeleteText, /* deleteProc */ DisplayCanvText, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ TextToPoint, /* pointProc */ TextToArea, /* areaProc */ TextToPostscript, /* postscriptProc */ @@ -498,7 +494,7 @@ ConfigureText( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) textPtr, flags|TK_CONFIG_OBJS)) { + objv, textPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 8a219ed..050ba3e 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -120,7 +120,7 @@ Tk_ItemType tkWindowType = { WinItemCoords, /* coordProc */ DeleteWinItem, /* deleteProc */ DisplayWinItem, /* displayProc */ - TK_ALWAYS_REDRAW|TK_CONFIG_OBJS, /* flags */ + TK_ALWAYS_REDRAW, /* flags */ WinItemToPoint, /* pointProc */ WinItemToArea, /* areaProc */ WinItemToPostscript, /* postscriptProc */ @@ -316,7 +316,7 @@ ConfigureWinItem( oldWindow = winItemPtr->tkwin; canvasTkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, canvasTkwin, configSpecs, objc, - (const char **) objv, (char *) winItemPtr, flags|TK_CONFIG_OBJS)) { + objv, winItemPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 2ff9ff3..879e06b 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -260,9 +260,6 @@ static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr, static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr, Tcl_Obj *const *objv, Tk_Uid uid, int enclosed); static double GridAlign(double coord, double spacing); -#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) -static const char** TkGetStringsFromObjs(Tcl_Size objc, Tcl_Obj *const *objv); -#endif static void InitCanvas(void); static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr); static Tcl_Obj * ScrollFractions(int screen1, @@ -328,7 +325,7 @@ static inline int AlwaysRedraw( Tk_Item *itemPtr) { - return itemPtr->typePtr->alwaysRedraw & 1; + return itemPtr->typePtr->flags & TK_ALWAYS_REDRAW; } static inline int @@ -339,25 +336,9 @@ ItemConfigure( Tcl_Obj *const objv[]) { Tcl_Interp *interp = canvasPtr->interp; - int result; - if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - const char **args = TkGetStringsFromObjs(objc, objv); - - result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, (Tcl_Obj **) args, TK_CONFIG_ARGV_ONLY); - if (args != NULL) { - ckfree(args); - } -#endif - } - return result; + return itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr, + itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY); } static inline int @@ -394,21 +375,9 @@ ItemCoords( if (itemPtr->typePtr->coordProc == NULL) { result = TCL_OK; - } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, objv); } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - const char **args = TkGetStringsFromObjs(objc, objv); - result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, (Tcl_Obj **) args); - if (args != NULL) { - ckfree(args); - } -#endif + itemPtr, objc, objv); } return result; } @@ -422,25 +391,9 @@ ItemCreate( Tcl_Obj *const objv[]) { Tcl_Interp *interp = canvasPtr->interp; - int result; - if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr, + return itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr, itemPtr, objc-3, objv+3); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - const char **args = TkGetStringsFromObjs(objc-3, objv+3); - - result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc-3, (Tcl_Obj **) args); - if (args != NULL) { - ckfree(args); - } -#endif - } - return result; } static inline void @@ -494,18 +447,9 @@ ItemIndex( if (itemPtr->typePtr->indexProc == NULL) { return TCL_OK; - } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objPtr, indexPtr); - } else { -#if defined(TK_NO_DEPRECATED) - Tcl_AppendResult(interp, "Flag TK_CONFIG_OBJS is mandatory", (void *)NULL); - return TCL_ERROR; -#else - return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, (Tcl_Obj *) Tcl_GetString(objPtr), indexPtr); -#endif } + return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr, + itemPtr, objPtr, indexPtr); } static inline void @@ -515,17 +459,8 @@ ItemInsert( int beforeThis, Tcl_Obj *toInsert) { - if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr, - beforeThis, toInsert); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr, - beforeThis, (Tcl_Obj *) Tcl_GetString(toInsert)); -#endif - } + itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr, + beforeThis, toInsert); } static inline int @@ -1231,7 +1166,7 @@ CanvasWidgetCmd( */ if (itemPtr == NULL || - !(itemPtr->typePtr->alwaysRedraw & TK_MOVABLE_POINTS)) { + !(itemPtr->typePtr->flags & TK_MOVABLE_POINTS)) { continue; } @@ -2325,8 +2260,8 @@ ConfigureCanvas( Tk_State old_canvas_state=canvasPtr->canvas_state; if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs, - objc, (const char **) objv, (char *) canvasPtr, - flags|TK_CONFIG_OBJS) != TCL_OK) { + objc, objv, canvasPtr, + flags) != TCL_OK) { return TCL_ERROR; } @@ -3364,8 +3299,8 @@ CanvasEventProc( /* * Special hack: if the canvas is unmapped, then must notify all items - * with "alwaysRedraw" set, so that they know that they are no longer - * displayed. + * with flag TK_ALWAYS_REDRAW set, so that they know that they are no + * longer displayed. */ for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL; @@ -6094,43 +6029,7 @@ CanvasSetOrigin( canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin), canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin)); } - -/* - *---------------------------------------------------------------------- - * - * TkGetStringsFromObjs -- - * - * Results: - * Converts object list into string list. - * - * Side effects: - * Memory is allocated for the objv array, which must be freed using - * ckfree() when no longer needed. - * - *---------------------------------------------------------------------- - */ - -#if !defined(TK_NO_DEPRECATED) && (TK_MAJOR_VERSION < 9) -static const char ** -TkGetStringsFromObjs( - Tcl_Size objc, - Tcl_Obj *const objv[]) -{ - Tcl_Size i; - const char **argv; - if (objc <= 0) { - return NULL; - } - argv = (const char **)ckalloc((objc+1) * sizeof(char *)); - for (i = 0; i < objc; i++) { - argv[i] = Tcl_GetString(objv[i]); - } - argv[objc] = 0; - return argv; -} -#endif - /* *-------------------------------------------------------------- * diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 88aacd4..aa9c476 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -224,7 +224,7 @@ Tk_InitConsoleChannels( * Ensure that we are getting a compatible version of Tcl. */ - if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) { return; } diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 22d1fd7..5a6b81a 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -142,7 +142,7 @@ EXTERN int Tk_ConfigureValue(Tcl_Interp *interp, /* 29 */ EXTERN int Tk_ConfigureWidget(Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, - Tcl_Size argc, const char **argv, + Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags); /* 30 */ EXTERN void Tk_ConfigureWindow(Tk_Window tkwin, @@ -288,9 +288,7 @@ EXTERN void Tk_FreeOptions(const Tk_ConfigSpec *specs, EXTERN void Tk_FreePixmap(Display *display, Pixmap pixmap); /* 76 */ EXTERN void Tk_FreeTextLayout(Tk_TextLayout textLayout); -/* 77 */ -TK_DEPRECATED("function does nothing, call can be removed") -void Tk_FreeXId(Display *display, XID xid); +/* Slot 77 is reserved */ /* 78 */ EXTERN GC Tk_GCForColor(XColor *colorPtr, Drawable drawable); /* 79 */ @@ -413,8 +411,7 @@ EXTERN Tk_Window Tk_IdToWindow(Display *display, Window window); EXTERN void Tk_ImageChanged(Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight); -/* 118 */ -EXTERN int Tk_Init(Tcl_Interp *interp); +/* Slot 118 is reserved */ /* 119 */ EXTERN Atom Tk_InternAtom(Tk_Window tkwin, const char *name); /* 120 */ @@ -476,34 +473,18 @@ EXTERN void Tk_OwnSelection(Tk_Window tkwin, Atom selection, EXTERN int Tk_ParseArgv(Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags); -/* 144 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height); -/* 145 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutZoomedBlock_NoComposite( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY); +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ /* 146 */ EXTERN int Tk_PhotoGetImage(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr); /* 147 */ EXTERN void Tk_PhotoBlank(Tk_PhotoHandle handle); -/* 148 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle, - int width, int height); +/* Slot 148 is reserved */ /* 149 */ EXTERN void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr); -/* 150 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle, - int width, int height); +/* Slot 150 is reserved */ /* 151 */ EXTERN int Tk_PointToChar(Tk_TextLayout layout, int x, int y); /* 152 */ @@ -529,8 +510,7 @@ EXTERN int Tk_RestackWindow(Tk_Window tkwin, int aboveBelow, /* 158 */ EXTERN Tk_RestrictProc * Tk_RestrictEvents(Tk_RestrictProc *proc, void *arg, void **prevArgPtr); -/* 159 */ -EXTERN int Tk_SafeInit(Tcl_Interp *interp); +/* Slot 159 is reserved */ /* 160 */ EXTERN const char * Tk_SetAppName(Tk_Window tkwin, const char *name); /* 161 */ @@ -679,10 +659,7 @@ EXTERN int Tk_GetScrollInfoObj(Tcl_Interp *interp, /* 211 */ EXTERN int Tk_InitOptions(Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); -/* 212 */ -EXTERN void Tk_MainEx(Tcl_Size argc, char **argv, - Tcl_AppInitProc *appInitProc, - Tcl_Interp *interp); +/* Slot 212 is reserved */ /* 213 */ EXTERN void Tk_RestoreSavedOptions(Tk_SavedOptions *savePtr); /* 214 */ @@ -692,8 +669,7 @@ EXTERN int Tk_SetOptions(Tcl_Interp *interp, void *recordPtr, Tk_SavedOptions *savePtr, int *maskPtr); /* 215 */ EXTERN void Tk_InitConsoleChannels(Tcl_Interp *interp); -/* 216 */ -EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp); +/* Slot 216 is reserved */ /* 217 */ EXTERN void Tk_CreateSmoothMethod(Tcl_Interp *interp, const Tk_SmoothMethod *method); @@ -785,17 +761,8 @@ EXTERN void Tk_SetMinimumRequestSize(Tk_Window tkwin, /* 245 */ EXTERN void Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height); -/* 246 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int compRule); -/* 247 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY, int compRule); +/* Slot 246 is reserved */ +/* Slot 247 is reserved */ /* 248 */ EXTERN int Tk_CollapseMotionEvents(Display *display, int collapse); @@ -821,10 +788,8 @@ EXTERN const char * Tk_NameOfStyle(Tk_Style style); /* 257 */ EXTERN Tk_Style Tk_AllocStyleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr); -/* 258 */ -EXTERN Tk_Style Tk_GetStyleFromObj(Tcl_Obj *objPtr); -/* 259 */ -EXTERN void Tk_FreeStyleFromObj(Tcl_Obj *objPtr); +/* Slot 258 is reserved */ +/* Slot 259 is reserved */ /* 260 */ EXTERN Tk_StyledElement Tk_GetStyledElement(Tk_Style style, Tcl_Size elementId, @@ -872,11 +837,8 @@ EXTERN long Tk_GetUserInactiveTime(Display *dpy); EXTERN void Tk_ResetUserInactiveTime(Display *dpy); /* 271 */ EXTERN Tcl_Interp * Tk_Interp(Tk_Window tkwin); -/* 272 */ -EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr); -/* 273 */ -EXTERN void Tk_CreateOldPhotoImageFormat( - const Tk_PhotoImageFormat *formatPtr); +/* Slot 272 is reserved */ +/* Slot 273 is reserved */ /* 274 */ EXTERN int Tk_AlwaysShowSelection(Tk_Window tkwin); /* 275 */ @@ -966,7 +928,7 @@ typedef struct TkStubs { int (*tk_ClipboardClear) (Tcl_Interp *interp, Tk_Window tkwin); /* 26 */ int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, void *widgRec, const char *argvName, int flags); /* 27 */ int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, void *widgRec, const char *argvName, int flags); /* 28 */ - int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size argc, const char **argv, void *widgRec, int flags); /* 29 */ + int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags); /* 29 */ void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr); /* 30 */ Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, const char *str, Tcl_Size numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr); /* 31 */ Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */ @@ -1014,7 +976,7 @@ typedef struct TkStubs { void (*tk_FreeOptions) (const Tk_ConfigSpec *specs, void *widgRec, Display *display, int needFlags); /* 74 */ void (*tk_FreePixmap) (Display *display, Pixmap pixmap); /* 75 */ void (*tk_FreeTextLayout) (Tk_TextLayout textLayout); /* 76 */ - TCL_DEPRECATED_API("function does nothing, call can be removed") void (*tk_FreeXId) (Display *display, XID xid); /* 77 */ + void (*reserved77)(void); GC (*tk_GCForColor) (XColor *colorPtr, Drawable drawable); /* 78 */ void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */ Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */ @@ -1055,7 +1017,7 @@ typedef struct TkStubs { void (*tk_HandleEvent) (XEvent *eventPtr); /* 115 */ Tk_Window (*tk_IdToWindow) (Display *display, Window window); /* 116 */ void (*tk_ImageChanged) (Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight); /* 117 */ - int (*tk_Init) (Tcl_Interp *interp); /* 118 */ + void (*reserved118)(void); Atom (*tk_InternAtom) (Tk_Window tkwin, const char *name); /* 119 */ int (*tk_IntersectTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height); /* 120 */ void (*tk_MaintainGeometry) (Tk_Window window, Tk_Window container, int x, int y, int width, int height); /* 121 */ @@ -1081,13 +1043,13 @@ typedef struct TkStubs { Tk_Window (*tk_NameToWindow) (Tcl_Interp *interp, const char *pathName, Tk_Window tkwin); /* 141 */ void (*tk_OwnSelection) (Tk_Window tkwin, Atom selection, Tk_LostSelProc *proc, void *clientData); /* 142 */ int (*tk_ParseArgv) (Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags); /* 143 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height); /* 144 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY); /* 145 */ + void (*reserved144)(void); + void (*reserved145)(void); int (*tk_PhotoGetImage) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr); /* 146 */ void (*tk_PhotoBlank) (Tk_PhotoHandle handle); /* 147 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoExpand_Panic) (Tk_PhotoHandle handle, int width, int height); /* 148 */ + void (*reserved148)(void); void (*tk_PhotoGetSize) (Tk_PhotoHandle handle, int *widthPtr, int *heightPtr); /* 149 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoSetSize_Panic) (Tk_PhotoHandle handle, int width, int height); /* 150 */ + void (*reserved150)(void); int (*tk_PointToChar) (Tk_TextLayout layout, int x, int y); /* 151 */ int (*tk_PostscriptFontName) (Tk_Font tkfont, Tcl_DString *dsPtr); /* 152 */ void (*tk_PreserveColormap) (Display *display, Colormap colormap); /* 153 */ @@ -1096,7 +1058,7 @@ typedef struct TkStubs { void (*tk_ResizeWindow) (Tk_Window tkwin, int width, int height); /* 156 */ int (*tk_RestackWindow) (Tk_Window tkwin, int aboveBelow, Tk_Window other); /* 157 */ Tk_RestrictProc * (*tk_RestrictEvents) (Tk_RestrictProc *proc, void *arg, void **prevArgPtr); /* 158 */ - int (*tk_SafeInit) (Tcl_Interp *interp); /* 159 */ + void (*reserved159)(void); const char * (*tk_SetAppName) (Tk_Window tkwin, const char *name); /* 160 */ void (*tk_SetBackgroundFromBorder) (Tk_Window tkwin, Tk_3DBorder border); /* 161 */ void (*tk_SetClass) (Tk_Window tkwin, const char *className); /* 162 */ @@ -1149,11 +1111,11 @@ typedef struct TkStubs { int (*tk_GetReliefFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *resultPtr); /* 209 */ int (*tk_GetScrollInfoObj) (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], double *dblPtr, int *intPtr); /* 210 */ int (*tk_InitOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 211 */ - TCL_DEPRECATED_API("Don't use this function in a stub-enabled extension") void (*tk_MainEx) (Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); /* 212 */ + void (*reserved212)(void); void (*tk_RestoreSavedOptions) (Tk_SavedOptions *savePtr); /* 213 */ int (*tk_SetOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionTable, Tcl_Size objc, Tcl_Obj *const objv[], Tk_Window tkwin, Tk_SavedOptions *savePtr, int *maskPtr); /* 214 */ void (*tk_InitConsoleChannels) (Tcl_Interp *interp); /* 215 */ - int (*tk_CreateConsoleWindow) (Tcl_Interp *interp); /* 216 */ + void (*reserved216)(void); void (*tk_CreateSmoothMethod) (Tcl_Interp *interp, const Tk_SmoothMethod *method); /* 217 */ void (*reserved218)(void); void (*reserved219)(void); @@ -1183,8 +1145,8 @@ typedef struct TkStubs { void (*tk_SetInternalBorderEx) (Tk_Window tkwin, int left, int right, int top, int bottom); /* 243 */ void (*tk_SetMinimumRequestSize) (Tk_Window tkwin, int minWidth, int minHeight); /* 244 */ void (*tk_SetCaretPos) (Tk_Window tkwin, int x, int y, int height); /* 245 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int compRule); /* 246 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 247 */ + void (*reserved246)(void); + void (*reserved247)(void); int (*tk_CollapseMotionEvents) (Display *display, int collapse); /* 248 */ Tk_StyleEngine (*tk_RegisterStyleEngine) (const char *name, Tk_StyleEngine parent); /* 249 */ Tk_StyleEngine (*tk_GetStyleEngine) (const char *name); /* 250 */ @@ -1195,8 +1157,8 @@ typedef struct TkStubs { void (*tk_FreeStyle) (Tk_Style style); /* 255 */ const char * (*tk_NameOfStyle) (Tk_Style style); /* 256 */ Tk_Style (*tk_AllocStyleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 257 */ - Tk_Style (*tk_GetStyleFromObj) (Tcl_Obj *objPtr); /* 258 */ - void (*tk_FreeStyleFromObj) (Tcl_Obj *objPtr); /* 259 */ + void (*reserved258)(void); + void (*reserved259)(void); Tk_StyledElement (*tk_GetStyledElement) (Tk_Style style, Tcl_Size elementId, Tk_OptionTable optionTable); /* 260 */ void (*tk_GetElementSize) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int width, int height, int inner, int *widthPtr, int *heightPtr); /* 261 */ void (*tk_GetElementBox) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr); /* 262 */ @@ -1209,8 +1171,8 @@ typedef struct TkStubs { long (*tk_GetUserInactiveTime) (Display *dpy); /* 269 */ void (*tk_ResetUserInactiveTime) (Display *dpy); /* 270 */ Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */ - void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */ - void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */ + void (*reserved272)(void); + void (*reserved273)(void); int (*tk_AlwaysShowSelection) (Tk_Window tkwin); /* 274 */ unsigned (*tk_GetButtonMask) (unsigned button); /* 275 */ int (*tk_GetDoublePixelsFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, double *doublePtr); /* 276 */ @@ -1396,8 +1358,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_FreePixmap) /* 75 */ #define Tk_FreeTextLayout \ (tkStubsPtr->tk_FreeTextLayout) /* 76 */ -#define Tk_FreeXId \ - (tkStubsPtr->tk_FreeXId) /* 77 */ +/* Slot 77 is reserved */ #define Tk_GCForColor \ (tkStubsPtr->tk_GCForColor) /* 78 */ #define Tk_GeometryRequest \ @@ -1478,8 +1439,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_IdToWindow) /* 116 */ #define Tk_ImageChanged \ (tkStubsPtr->tk_ImageChanged) /* 117 */ -#define Tk_Init \ - (tkStubsPtr->tk_Init) /* 118 */ +/* Slot 118 is reserved */ #define Tk_InternAtom \ (tkStubsPtr->tk_InternAtom) /* 119 */ #define Tk_IntersectTextLayout \ @@ -1530,20 +1490,16 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_OwnSelection) /* 142 */ #define Tk_ParseArgv \ (tkStubsPtr->tk_ParseArgv) /* 143 */ -#define Tk_PhotoPutBlock_NoComposite \ - (tkStubsPtr->tk_PhotoPutBlock_NoComposite) /* 144 */ -#define Tk_PhotoPutZoomedBlock_NoComposite \ - (tkStubsPtr->tk_PhotoPutZoomedBlock_NoComposite) /* 145 */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ #define Tk_PhotoGetImage \ (tkStubsPtr->tk_PhotoGetImage) /* 146 */ #define Tk_PhotoBlank \ (tkStubsPtr->tk_PhotoBlank) /* 147 */ -#define Tk_PhotoExpand_Panic \ - (tkStubsPtr->tk_PhotoExpand_Panic) /* 148 */ +/* Slot 148 is reserved */ #define Tk_PhotoGetSize \ (tkStubsPtr->tk_PhotoGetSize) /* 149 */ -#define Tk_PhotoSetSize_Panic \ - (tkStubsPtr->tk_PhotoSetSize_Panic) /* 150 */ +/* Slot 150 is reserved */ #define Tk_PointToChar \ (tkStubsPtr->tk_PointToChar) /* 151 */ #define Tk_PostscriptFontName \ @@ -1560,8 +1516,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_RestackWindow) /* 157 */ #define Tk_RestrictEvents \ (tkStubsPtr->tk_RestrictEvents) /* 158 */ -#define Tk_SafeInit \ - (tkStubsPtr->tk_SafeInit) /* 159 */ +/* Slot 159 is reserved */ #define Tk_SetAppName \ (tkStubsPtr->tk_SetAppName) /* 160 */ #define Tk_SetBackgroundFromBorder \ @@ -1666,16 +1621,14 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_GetScrollInfoObj) /* 210 */ #define Tk_InitOptions \ (tkStubsPtr->tk_InitOptions) /* 211 */ -#define Tk_MainEx \ - (tkStubsPtr->tk_MainEx) /* 212 */ +/* Slot 212 is reserved */ #define Tk_RestoreSavedOptions \ (tkStubsPtr->tk_RestoreSavedOptions) /* 213 */ #define Tk_SetOptions \ (tkStubsPtr->tk_SetOptions) /* 214 */ #define Tk_InitConsoleChannels \ (tkStubsPtr->tk_InitConsoleChannels) /* 215 */ -#define Tk_CreateConsoleWindow \ - (tkStubsPtr->tk_CreateConsoleWindow) /* 216 */ +/* Slot 216 is reserved */ #define Tk_CreateSmoothMethod \ (tkStubsPtr->tk_CreateSmoothMethod) /* 217 */ /* Slot 218 is reserved */ @@ -1732,10 +1685,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_SetMinimumRequestSize) /* 244 */ #define Tk_SetCaretPos \ (tkStubsPtr->tk_SetCaretPos) /* 245 */ -#define Tk_PhotoPutBlock_Panic \ - (tkStubsPtr->tk_PhotoPutBlock_Panic) /* 246 */ -#define Tk_PhotoPutZoomedBlock_Panic \ - (tkStubsPtr->tk_PhotoPutZoomedBlock_Panic) /* 247 */ +/* Slot 246 is reserved */ +/* Slot 247 is reserved */ #define Tk_CollapseMotionEvents \ (tkStubsPtr->tk_CollapseMotionEvents) /* 248 */ #define Tk_RegisterStyleEngine \ @@ -1756,10 +1707,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_NameOfStyle) /* 256 */ #define Tk_AllocStyleFromObj \ (tkStubsPtr->tk_AllocStyleFromObj) /* 257 */ -#define Tk_GetStyleFromObj \ - (tkStubsPtr->tk_GetStyleFromObj) /* 258 */ -#define Tk_FreeStyleFromObj \ - (tkStubsPtr->tk_FreeStyleFromObj) /* 259 */ +/* Slot 258 is reserved */ +/* Slot 259 is reserved */ #define Tk_GetStyledElement \ (tkStubsPtr->tk_GetStyledElement) /* 260 */ #define Tk_GetElementSize \ @@ -1784,10 +1733,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_ResetUserInactiveTime) /* 270 */ #define Tk_Interp \ (tkStubsPtr->tk_Interp) /* 271 */ -#define Tk_CreateOldImageType \ - (tkStubsPtr->tk_CreateOldImageType) /* 272 */ -#define Tk_CreateOldPhotoImageFormat \ - (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */ +/* Slot 272 is reserved */ +/* Slot 273 is reserved */ #define Tk_AlwaysShowSelection \ (tkStubsPtr->tk_AlwaysShowSelection) /* 274 */ #define Tk_GetButtonMask \ @@ -1827,44 +1774,34 @@ extern const TkStubs *tkStubsPtr; /* !END!: Do not edit above this line. */ -/* Functions that don't belong in the stub table */ -#undef Tk_MainEx -#undef Tk_Init -#undef Tk_SafeInit -#undef Tk_CreateConsoleWindow - -#undef Tk_FreeXId -#define Tk_FreeXId(display,xid) -#undef Tk_GetStyleFromObj -#undef Tk_FreeStyleFromObj -#define Tk_GetStyleFromObj(obj) Tk_AllocStyleFromObj(NULL, obj) -#define Tk_FreeStyleFromObj(obj) /* no-op */ #define Tk_GetImageMasterData Tk_GetImageModelData #ifndef MAC_OSX_TK # undef Tk_ClipDrawableToRect #endif +EXTERN void Tk_MainEx(Tcl_Size argc, char **argv, + Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #if defined(_WIN32) && defined(UNICODE) # define Tk_MainEx Tk_MainExW EXTERN void Tk_MainExW(Tcl_Size argc, wchar_t **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #endif +EXTERN int Tk_Init(Tcl_Interp *interp); +EXTERN int Tk_SafeInit(Tcl_Interp *interp); +EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp); - -#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 -#undef Tk_PhotoPutBlock_NoComposite -#undef Tk_PhotoPutZoomedBlock_NoComposite -#undef Tk_PhotoExpand_Panic -#undef Tk_PhotoPutBlock_Panic -#undef Tk_PhotoPutZoomedBlock_Panic -#undef Tk_PhotoSetSize_Panic -#undef Tk_CreateOldPhotoImageFormat -#endif /* TK_NO_DEPRECATED */ +#if TK_MAJOR_VERSION < 9 +/* Restore 8.x signature of Tk_ConfigureWidget, but panic if TK_CONFIG_OBJS flag is not set */ +#undef Tk_ConfigureWidget +#define Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags) \ + ((int (*)(Tcl_Interp *, Tk_Window, const Tk_ConfigSpec *, \ + int, const char **, char *, int))(void *)(tkStubsPtr->tk_ConfigureWidget)) \ + (((flags & TK_CONFIG_OBJS) ? interp : (Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory in Tk_ConfigureWidget"), \ + NULL)), tkwin, specs, argc, argv, widgRec, flags) +#endif #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkUnusedStubEntry - #endif /* _TKDECLS */ diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 6601d65..6da9e40 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -2002,8 +2002,8 @@ EntryComputeGeometry( * resulting string. */ - TkUtfToUniChar(entryPtr->showChar, &ch); - size = TkUniCharToUtf(ch, buf); + Tcl_UtfToUniChar(entryPtr->showChar, &ch); + size = Tcl_UniCharToUtf(ch, buf); entryPtr->numDisplayBytes = entryPtr->numChars * size; p = (char *)ckalloc(entryPtr->numDisplayBytes + 1); @@ -3584,7 +3584,7 @@ ExpandPercents( before++; /* skip over % */ if (*before != '\0') { - before += TkUtfToUniChar(before, &ch); + before += Tcl_UtfToUniChar(before, &ch); } else { ch = '%'; } @@ -3604,7 +3604,7 @@ ExpandPercents( string = Tk_PathName(entryPtr->tkwin); break; default: - length = TkUniCharToUtf(ch, numStorage); + length = Tcl_UniCharToUtf(ch, numStorage); numStorage[length] = '\0'; string = numStorage; break; @@ -3664,7 +3664,7 @@ ExpandPercents( string = Tk_PathName(entryPtr->tkwin); break; default: - length = TkUniCharToUtf(ch, numStorage); + length = Tcl_UniCharToUtf(ch, numStorage); numStorage[length] = '\0'; string = numStorage; break; diff --git a/generic/tkFont.c b/generic/tkFont.c index 87fa3d9..384119c 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -576,7 +576,7 @@ Tk_FontObjCmd( if (charPtr != NULL) { const char *string = Tcl_GetString(charPtr); - size_t len = TkUtfToUniChar(string, &uniChar); + size_t len = Tcl_UtfToUniChar(string, &uniChar); if (len != (size_t)charPtr->length) { resultPtr = Tcl_NewStringObj( @@ -1744,14 +1744,14 @@ Tk_PostscriptFontName( src++; upper = 1; } - src += TkUtfToUniChar(src, &ch); + src += Tcl_UtfToUniChar(src, &ch); if (upper) { ch = Tcl_UniCharToUpper(ch); upper = 0; } else { ch = Tcl_UniCharToLower(ch); } - dest += TkUniCharToUtf(ch, dest); + dest += Tcl_UniCharToUtf(ch, dest); } *dest = '\0'; Tcl_DStringSetLength(dsPtr, dest - Tcl_DStringValue(dsPtr)); @@ -2791,7 +2791,7 @@ Tk_CharBbox( } if (widthPtr != NULL) { int ch; - Tk_MeasureChars(tkfont, end, TkUtfToUniChar(end, &ch), -1, 0, &w); + Tk_MeasureChars(tkfont, end, Tcl_UtfToUniChar(end, &ch), -1, 0, &w); } goto check; } @@ -3337,7 +3337,7 @@ Tk_TextLayoutToPostscript( * international postscript fonts. */ - p += TkUtfToUniChar(p, &ch); + p += Tcl_UtfToUniChar(p, &ch); if ((ch == '(') || (ch == ')') || (ch == '\\') || (ch < 0x20)) { /* * Tricky point: the "03" is necessary in the snprintf below, diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 82e33c4..6ea82ae 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -43,7 +43,7 @@ typedef struct { * available for this widget. */ char *className; /* Class name for widget (from configuration * option). Malloc-ed. */ - enum FrameType type; /* Type of widget, such as TYPE_FRAME. */ + int type; /* Type of widget, such as TYPE_FRAME. */ char *screenName; /* Screen on which widget is created. Non-null * only for top-levels. Malloc-ed, may be * NULL. */ @@ -329,9 +329,6 @@ static const Tk_OptionSpec *const optionSpecs[] = { static void ComputeFrameGeometry(Frame *framePtr); static int ConfigureFrame(Tcl_Interp *interp, Frame *framePtr, int objc, Tcl_Obj *const objv[]); -static int CreateFrame(void *clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[], - enum FrameType type, const char *appName); static Tcl_FreeProc DestroyFrame; static void DestroyFramePartly(Frame *framePtr); static void DisplayFrame(void *clientData); @@ -405,7 +402,7 @@ Tk_FrameObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return CreateFrame(clientData, interp, objc, objv, TYPE_FRAME, NULL); + return TkCreateFrame(clientData, interp, objc, objv, TYPE_FRAME, NULL); } int @@ -415,7 +412,7 @@ Tk_ToplevelObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return CreateFrame(clientData, interp, objc, objv, TYPE_TOPLEVEL, NULL); + return TkCreateFrame(clientData, interp, objc, objv, TYPE_TOPLEVEL, NULL); } int @@ -425,7 +422,7 @@ Tk_LabelframeObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return CreateFrame(clientData, interp, objc, objv, TYPE_LABELFRAME, NULL); + return TkCreateFrame(clientData, interp, objc, objv, TYPE_LABELFRAME, NULL); } /* @@ -446,67 +443,13 @@ Tk_LabelframeObjCmd( * *-------------------------------------------------------------- */ - int TkCreateFrame( - void *clientData, /* Either NULL or pointer to option table. */ - Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - const char *const *argv, /* Argument strings. */ - int toplevel, /* Non-zero means create a toplevel window, - * zero means create a frame. */ - const char *appName) /* Should only be non-NULL if there is no main - * window associated with the interpreter. - * Gives the base name to use for the new - * application. */ -{ - int result, i; - Tcl_Obj **objv = (Tcl_Obj **)ckalloc((argc+1) * sizeof(Tcl_Obj **)); - - for (i=0; i<argc; i++) { - objv[i] = Tcl_NewStringObj(argv[i], TCL_INDEX_NONE); - Tcl_IncrRefCount(objv[i]); - } - objv[argc] = NULL; - result = CreateFrame(clientData, interp, argc, objv, - toplevel ? TYPE_TOPLEVEL : TYPE_FRAME, appName); - for (i=0; i<argc; i++) { - Tcl_DecrRefCount(objv[i]); - } - ckfree(objv); - return result; -} - -int -TkListCreateFrame( - void *clientData, /* Either NULL or pointer to option table. */ - Tcl_Interp *interp, /* Current interpreter. */ - Tcl_Obj *listObj, /* List of arguments. */ - int toplevel, /* Non-zero means create a toplevel window, - * zero means create a frame. */ - Tcl_Obj *nameObj) /* Should only be non-NULL if there is no main - * window associated with the interpreter. - * Gives the base name to use for the new - * application. */ -{ - Tcl_Size objc; - Tcl_Obj **objv; - - if (TCL_OK != Tcl_ListObjGetElements(interp, listObj, &objc, &objv)) { - return TCL_ERROR; - } - return CreateFrame(clientData, interp, objc, objv, - toplevel ? TYPE_TOPLEVEL : TYPE_FRAME, - nameObj ? Tcl_GetString(nameObj) : NULL); -} - -static int -CreateFrame( TCL_UNUSED(void *), Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[], /* Argument objects. */ - enum FrameType type, /* What widget type to create. */ + int type, /* What widget type to create. */ const char *appName) /* Should only be non-NULL if there are no * Main window associated with the * interpreter. Gives the base name to use for @@ -518,8 +461,8 @@ CreateFrame( Tk_Window newWin; const char *className, *screenName, *visualName, *colormapName; const char *arg, *useOption; - int i, depth; - Tcl_Size length; + int depth; + Tcl_Size i, length; unsigned int mask; Colormap colormap; Visual *visual; diff --git a/generic/tkIcu.c b/generic/tkIcu.c index 9696868..c11f78a 100644 --- a/generic/tkIcu.c +++ b/generic/tkIcu.c @@ -92,7 +92,8 @@ startEndOfCmd( str = Tcl_GetStringFromObj(objv[1], &len); Tcl_UtfToChar16DString(str, len, &ds); len = Tcl_DStringLength(&ds)/2; - if (TkGetIntForIndex(objv[2], len-1, 0, &idx) != TCL_OK) { + Tcl_Size ulen = Tcl_GetCharLength(objv[1]); + if (TkGetIntForIndex(objv[2], ulen-1, 0, &idx) != TCL_OK) { Tcl_DStringFree(&ds); Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"", Tcl_GetString(objv[2]))); Tcl_SetErrorCode(interp, "TK", "ICU", "INDEX", NULL); @@ -111,6 +112,14 @@ startEndOfCmd( Tcl_SetErrorCode(interp, "TK", "ICU", "CANNOTOPEN", NULL); return TCL_ERROR; } + if (idx > 0 && len != ulen) { + /* The string contains codepoints > \uFFFF. Determine UTF-16 index */ + Tcl_Size newIdx = 0; + for (Tcl_Size i = 0; i < idx; i++) { + newIdx += 1 + (((newIdx < (Tcl_Size)len-1) && (ustr[newIdx]&0xFC00) == 0xD800) && ((ustr[newIdx+1]&0xFC00) == 0xDC00)); + } + idx = newIdx; + } if (flags & FLAG_FOLLOWING) { if ((idx < 0) && (flags & FLAG_WORD)) { idx = 0; @@ -145,6 +154,14 @@ startEndOfCmd( icu_close(it); Tcl_DStringFree(&ds); if (idx != TCL_INDEX_NONE) { + if (idx > 0 && len != ulen) { + /* The string contains codepoints > \uFFFF. Determine UTF-32 index */ + Tcl_Size newIdx = 1; + for (Tcl_Size i = 1; i < idx; i++) { + if (((ustr[i-1]&0xFC00) != 0xD800) || ((ustr[i]&0xFC00) != 0xDC00)) newIdx++; + } + idx = newIdx; + } Tcl_SetObjResult(interp, TkNewIndexObj(idx)); } return TCL_OK; diff --git a/generic/tkImage.c b/generic/tkImage.c index e34ced4..5290b7e 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -129,7 +129,7 @@ ImageTypeThreadExitProc( /* *---------------------------------------------------------------------- * - * Tk_CreateOldImageType, Tk_CreateImageType -- + * Tk_CreateImageType -- * * This function is invoked by an image manager to tell Tk about a new * kind of image and the functions that manage the new type. The function @@ -146,27 +146,6 @@ ImageTypeThreadExitProc( */ void -Tk_CreateOldImageType( - const Tk_ImageType *typePtr) - /* Structure describing the type. All of the - * fields except "nextPtr" must be filled in - * by caller. */ -{ - Tk_ImageType *copyPtr; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - - if (!tsdPtr->initialized) { - tsdPtr->initialized = 1; - Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL); - } - copyPtr = (Tk_ImageType *)ckalloc(sizeof(Tk_ImageType)); - *copyPtr = *typePtr; - copyPtr->nextPtr = tsdPtr->oldImageTypeList; - tsdPtr->oldImageTypeList = copyPtr; -} - -void Tk_CreateImageType( const Tk_ImageType *typePtr) /* Structure describing the type. All of the diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index a7da3d9..2fad264 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -240,7 +240,7 @@ ImgBmapConfigureModel( int maskWidth, maskHeight, dummy1, dummy2; if (Tk_ConfigureWidget(modelPtr->interp, Tk_MainWindow(modelPtr->interp), - configSpecs, objc, (const char **) objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) { + configSpecs, objc, objv, modelPtr, flags) != TCL_OK) { return TCL_ERROR; } diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index b8b3dd7..4a7d4ed 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -139,11 +139,6 @@ typedef struct { Tk_PhotoImageFormat *formatList; /* Pointer to the first in the list of known * photo image formats.*/ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - Tk_PhotoImageFormat *oldFormatList; - /* Pointer to the first in the list of known - * photo image formats.*/ -#endif Tk_PhotoImageFormatVersion3 *formatListVersion3; /* Pointer to the first in the list of known * photo image formats in Version3 format.*/ @@ -247,13 +242,6 @@ PhotoFormatThreadExitProc( ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - while (tsdPtr->oldFormatList != NULL) { - freePtr = tsdPtr->oldFormatList; - tsdPtr->oldFormatList = tsdPtr->oldFormatList->nextPtr; - ckfree(freePtr); - } -#endif while (tsdPtr->formatList != NULL) { freePtr = tsdPtr->formatList; tsdPtr->formatList = tsdPtr->formatList->nextPtr; @@ -271,7 +259,7 @@ PhotoFormatThreadExitProc( /* *---------------------------------------------------------------------- * - * Tk_CreateOldPhotoImageFormat, Tk_CreatePhotoImageFormat, + * Tk_CreatePhotoImageFormat, * Tk_CreatePhotoImageFormatVersion3 -- * * This function is invoked by an image file handler to register a new @@ -288,29 +276,6 @@ PhotoFormatThreadExitProc( *---------------------------------------------------------------------- */ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -void -Tk_CreateOldPhotoImageFormat( - const Tk_PhotoImageFormat *formatPtr) - /* Structure describing the format. All of the - * fields except "nextPtr" must be filled in - * by caller. */ -{ - Tk_PhotoImageFormat *copyPtr; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - - if (!tsdPtr->initialized) { - tsdPtr->initialized = 1; - Tcl_CreateThreadExitHandler(PhotoFormatThreadExitProc, NULL); - } - copyPtr = (Tk_PhotoImageFormat *)ckalloc(sizeof(Tk_PhotoImageFormat)); - *copyPtr = *formatPtr; - copyPtr->nextPtr = tsdPtr->oldFormatList; - tsdPtr->oldFormatList = copyPtr; -} -#endif - void Tk_CreatePhotoImageFormat( const Tk_PhotoImageFormat *formatPtr) @@ -328,12 +293,6 @@ Tk_CreatePhotoImageFormat( } copyPtr = (Tk_PhotoImageFormat *)ckalloc(sizeof(Tk_PhotoImageFormat)); *copyPtr = *formatPtr; -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (isupper((unsigned char) *formatPtr->name)) { - copyPtr->nextPtr = tsdPtr->oldFormatList; - tsdPtr->oldFormatList = copyPtr; - } else -#endif { /* for compatibility with aMSN: make a copy of formatPtr->name */ char *name = (char *)ckalloc(strlen(formatPtr->name) + 1); @@ -835,23 +794,6 @@ ImgPhotoCmd( } } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (stringWriteProc == NULL) { - oldformat = 1; - for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL; - imageFormat = imageFormat->nextPtr) { - if ((strncasecmp(Tcl_GetString(options.format), - imageFormat->name, - strlen(imageFormat->name)) == 0)) { - matched = 1; - if (imageFormat->stringWriteProc != NULL) { - stringWriteProc = imageFormat->stringWriteProc; - break; - } - } - } - } -#endif if (stringWriteProc == NULL) { oldformat = 0; for (imageFormatVersion3 = tsdPtr->formatListVersion3; @@ -1512,22 +1454,6 @@ readCleanup: } } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (imageFormat == NULL) { - oldformat = 1; - for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL; - imageFormat = imageFormat->nextPtr) { - if ((fmtString == NULL) - || (strncasecmp(fmtString, imageFormat->name, - strlen(imageFormat->name)) == 0)) { - matched = 1; - if (imageFormat->fileWriteProc != NULL) { - break; - } - } - } - } -#endif if (imageFormat == NULL) { oldformat = 0; for (imageFormatVersion3 = tsdPtr->formatListVersion3; @@ -2047,7 +1973,7 @@ ImgPhotoConfigureModel( */ if (Tk_ConfigureWidget(interp, Tk_MainWindow(interp), configSpecs, - objc, (const char **)objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) { + objc, objv, modelPtr, flags) != TCL_OK) { goto errorExit; } @@ -2778,42 +2704,6 @@ MatchFileFormat( } } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -if (formatPtr == NULL) { - useoldformat = 1; - for (formatPtr = tsdPtr->oldFormatList; formatPtr != NULL; - formatPtr = formatPtr->nextPtr) { - if (formatString != NULL) { - if (strncasecmp(formatString, - formatPtr->name, strlen(formatPtr->name)) != 0) { - continue; - } - matched = 1; - if (formatPtr->fileMatchProc == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "-file option isn't supported for %s images", - formatString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "NOT_FILE_FORMAT", NULL); - return TCL_ERROR; - } - } - if (formatPtr->fileMatchProc != NULL) { - (void) Tcl_Seek(chan, Tcl_LongAsWide(0L), SEEK_SET); - if (formatPtr->fileMatchProc(chan, fileName, (Tcl_Obj *) - formatString, widthPtr, heightPtr, interp)) { - if (*widthPtr < 1) { - *widthPtr = 1; - } - if (*heightPtr < 1) { - *heightPtr = 1; - } - break; - } - } - } - } -#endif /* * For old and not version 3 format, exit now with success @@ -3011,38 +2901,6 @@ MatchStringFormat( } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (formatPtr == NULL) { - useoldformat = 1; - for (formatPtr = tsdPtr->oldFormatList; formatPtr != NULL; - formatPtr = formatPtr->nextPtr) { - if (formatObj != NULL) { - if (strncasecmp(formatString, - formatPtr->name, strlen(formatPtr->name)) != 0) { - continue; - } - matched = 1; - if (formatPtr->stringMatchProc == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "-data option isn't supported for %s images", - formatString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "NOT_DATA_FORMAT", NULL); - return TCL_ERROR; - } - } - if ((formatPtr->stringMatchProc != NULL) - && (formatPtr->stringReadProc != NULL) - && formatPtr->stringMatchProc( - (Tcl_Obj *) Tcl_GetString(data), - (Tcl_Obj *) formatString, - widthPtr, heightPtr, interp)) { - break; - } - } - } -#endif - if (formatPtr == NULL) { useoldformat = 0; for (formatVersion3Ptr = tsdPtr->formatListVersion3; @@ -4531,107 +4389,6 @@ ImgPhotoPostscript( } /* - *---------------------------------------------------------------------- - * - * Tk_PhotoPutBlock_NoComposite, Tk_PhotoPutZoomedBlock_NoComposite -- - * - * These backward-compatibility functions just exist to fill slots in stubs - * table. For the behaviour of *_NoComposite, refer to the corresponding - * function without the extra suffix, except that the compositing rule is - * always "overlay" and the function always panics on memory-allocation - * failure. - * - *---------------------------------------------------------------------- - */ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -void -Tk_PhotoPutBlock_NoComposite( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height) -{ - if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height, - TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoPutZoomedBlock_NoComposite( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height, - int zoomX, int zoomY, int subsampleX, int subsampleY) -{ - if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height, - zoomX, zoomY, subsampleX, subsampleY, - TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -/* - *---------------------------------------------------------------------- - * - * Tk_PhotoExpand_Panic, Tk_PhotoPutBlock_Panic, - * Tk_PhotoPutZoomedBlock_Panic, Tk_PhotoSetSize_Panic - * - * Backward compatibility functions for preserving the old behaviour (i.e. - * panic on memory allocation failure) so that extensions do not need to be - * significantly updated to take account of TIP #116. These call the new - * interface (i.e. the interface without the extra suffix), but panic if an - * error condition is returned. - * - *---------------------------------------------------------------------- - */ - -void -Tk_PhotoExpand_Panic( - Tk_PhotoHandle handle, - int width, int height) -{ - if (Tk_PhotoExpand(NULL, handle, width, height) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoPutBlock_Panic( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height, int compRule) -{ - if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height, - compRule) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoPutZoomedBlock_Panic( - Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height, - int zoomX, int zoomY, int subsampleX, int subsampleY, - int compRule) -{ - if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height, - zoomX, zoomY, subsampleX, subsampleY, compRule) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoSetSize_Panic( - Tk_PhotoHandle handle, - int width, int height) -{ - if (Tk_PhotoSetSize(NULL, handle, width, height) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} -#endif /* TK_NO_DEPRECATED */ - -/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 8b1aab3..e6db14e 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -68,7 +68,7 @@ declare 12 { } declare 13 { int TkCreateFrame(void *clientData, Tcl_Interp *interp, - int argc, const char *const *argv, int toplevel, const char *appName) + Tcl_Size objc, Tcl_Obj *const objv[], int type, const char *appName) } declare 14 { Tk_Window TkCreateMainWindow(Tcl_Interp *interp, @@ -226,9 +226,6 @@ declare 58 { declare 59 { void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name) } -declare 60 {deprecated {renamed to Tk_GetOtherWindow}} { - TkWindow *TkpGetOtherWindow(TkWindow *winPtr) -} declare 61 { TkWindow *TkpGetWrapperWindow(TkWindow *winPtr) } @@ -239,15 +236,9 @@ declare 63 { void TkpInitializeMenuBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable) } -declare 64 {deprecated {renamed to Tk_MakeContainer}} { - void TkpMakeContainer(Tk_Window tkwin) -} declare 65 { void TkpMakeMenuWindow(Tk_Window tkwin, int transient) } -declare 66 {deprecated {renamed to Tk_MakeWindow}} { - Window TkpMakeWindow(TkWindow *winPtr, Window parent) -} declare 67 { void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp, const char *menuName) } @@ -269,15 +260,6 @@ declare 72 { declare 73 { void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr) } -declare 74 {deprecated {renamed to Tk_SetMainMenubar}} { - void TkpSetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName) -} -declare 75 {deprecated {renamed to Tk_UseWindow}} { - int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, const char *string) -} -# -# Slot 76 unused (WAS: TkpWindowWasRecentlyDeleted) -# declare 77 { void TkQueueEventForAllChildren(TkWindow *winPtr, XEvent *eventPtr) } @@ -302,16 +284,6 @@ declare 82 { declare 83 { void TkSelPropProc(XEvent *eventPtr) } - -# Exported publically as Tk_SetClassProcs in 8.4a2 -#declare 84 { -# void TkSetClassProcs(Tk_Window tkwin, -# TkClassProcs *procs, void *instanceData) -#} -declare 85 {deprecated {renamed to Tk_SetWindowMenubar}} { - void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, - const char *oldMenuName, const char *menuName) -} declare 86 { KeySym TkStringToKeysym(const char *name) } @@ -394,10 +366,6 @@ declare 109 { declare 110 { void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont) } -declare 111 {deprecated {renamed to Tk_GetSystemDefault}} { - Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin, - const char *dbName, const char *className) -} declare 112 { void TkpMenuThreadInit(void) } @@ -424,20 +392,16 @@ declare 119 { int XUnionRectWithRegion(XRectangle *rect, Region src, Region dr_return) } -declare 121 aqua { +declare 121 { Pixmap TkpCreateNativeBitmap(Display *display, const void *source) } -declare 122 aqua { +declare 122 { void TkpDefineNativeBitmaps(void) } -declare 124 aqua { +declare 124 { Pixmap TkpGetNativeAppBitmap(Display *display, const char *name, int *width, int *height) } -declare 135 {deprecated {renamed to Tk_DrawHighlightBorder}} { - void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC, - int highlightWidth, Drawable drawable) -} declare 136 { void TkSetFocusWin(TkWindow *winPtr, int force) } @@ -666,58 +630,33 @@ declare 0 x11 { declare 2 x11 { void TkGenerateActivateEvents(TkWindow *winPtr, int active) } -declare 3 x11 { - int TkpCmapStressed(Tk_Window tkwin, Colormap colormap) -} -declare 4 x11 { - void TkpSync(Display *display) -} -declare 5 x11 { - Window TkUnixContainerId(TkWindow *winPtr) -} declare 6 x11 { - int TkUnixDoOneXEvent(Tcl_Time *timePtr) -} -declare 7 x11 { - void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) -} -declare 8 x11 { int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } declare 9 x11 { - void TkWmCleanup(TkDisplay *dispPtr) -} -declare 10 x11 { - void TkSendCleanup(TkDisplay *dispPtr) -} -declare 12 x11 { int TkpWmSetState(TkWindow *winPtr, int state) } # only needed by tktest: -declare 13 x11 { - int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, Tcl_Size objc, - Tcl_Obj *const objv[]) -} declare 38 x11 { - int TkpCmapStressed_(Tk_Window tkwin, Colormap colormap) + int TkpCmapStressed(Tk_Window tkwin, Colormap colormap) } declare 39 x11 { - void TkpSync_(Display *display) + void TkpSync(Display *display) } declare 40 x11 { - Window TkUnixContainerId_(TkWindow *winPtr) + Window TkUnixContainerId(TkWindow *winPtr) } declare 41 x11 { - int TkUnixDoOneXEvent_(Tcl_Time *timePtr) + int TkUnixDoOneXEvent(Tcl_Time *timePtr) } declare 42 x11 { - void TkUnixSetMenubar_(Tk_Window tkwin, Tk_Window menubar) + void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) } declare 43 x11 { - void TkWmCleanup_(TkDisplay *dispPtr) + void TkWmCleanup(TkDisplay *dispPtr) } declare 44 x11 { - void TkSendCleanup_(TkDisplay *dispPtr) + void TkSendCleanup(TkDisplay *dispPtr) } # only needed by tktest: declare 45 x11 { @@ -729,7 +668,7 @@ declare 45 x11 { # Windows specific functions declare 0 win { - char *TkAlignImageData(XImage *image, int alignment, int bitOrder) + void TkCreateXEventSource(void) } declare 2 win { void TkGenerateActivateEvents(TkWindow *winPtr, int active) @@ -832,7 +771,7 @@ declare 32 win { const char *dbName, const char *className) } declare 33 win { - int TkWinGetPlatformId(void) + char *TkAlignImageData(XImage *image, int alignment, int bitOrder) } # new for 8.4.1 @@ -851,10 +790,6 @@ declare 36 win { UINT message, WPARAM wParam, LPARAM lParam) } -# new for 8.4.20+/8.5.12+, Cygwin only -declare 37 win { - void TkCreateXEventSource(void) -} declare 38 win { int TkpCmapStressed(Tk_Window tkwin, Colormap colormap) } @@ -888,26 +823,26 @@ declare 47 win { ################################ # Aqua specific functions -declare 0 aqua { - void TkGenerateActivateEvents(TkWindow *winPtr, int active) +declare 1 aqua { + void TkAboutDlg(void) } declare 2 aqua { - void TkGenerateActivateEvents_(TkWindow *winPtr, int active) + void TkGenerateActivateEvents(TkWindow *winPtr, int active) } declare 3 aqua { - void TkPointerDeadWindow(TkWindow *winPtr) + unsigned long TkpGetMS(void) } declare 4 aqua { - void TkpSetCapture(TkWindow *winPtr) + void TkPointerDeadWindow(TkWindow *winPtr) } declare 5 aqua { void TkpSetCursor(TkpCursor cursor) } declare 6 aqua { - void TkpWmSetState(TkWindow *winPtr, int state) + int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } declare 7 aqua { - void TkAboutDlg(void) + int TkpWmSetState(TkWindow *winPtr, int state) } declare 8 aqua { unsigned int TkMacOSXButtonKeyState(void) @@ -918,10 +853,9 @@ declare 9 aqua { declare 10 aqua { int TkMacOSXDispatchMenuEvent(int menuID, int index) } -# Now a static function -# declare 11 aqua { -# void TkMacOSXInstallCursor(int resizeOverride) -# } +declare 11 aqua { + void TkpSetCapture(TkWindow *winPtr) +} declare 12 aqua { void TkMacOSXHandleTearoffMenu(void) } @@ -938,22 +872,9 @@ declare 18 aqua { void TkMacOSXHandleMenuSelect(short theMenu, unsigned short theItem, int optionKeyPressed) } - -# removed duplicates from tkPlat table(tk.decls) -#declare 19 aqua { -# void TkMacOSXInitAppleEvents(Tcl_Interp *interp) -#} -# -#declare 20 aqua { -# void TkMacOSXInitMenus(Tcl_Interp *interp) -#} - declare 21 aqua { void TkMacOSXInvalidateWindow(MacDrawable *macWin, int flag) } -declare 22 aqua { - int TkMacOSXIsCharacterMissing(Tk_Font tkfont, unsigned int searchChar) -} declare 23 aqua { void TkMacOSXMakeRealWindowExist(TkWindow *winPtr) } @@ -963,10 +884,6 @@ declare 24 aqua { declare 25 aqua { void TkMacOSXMenuClick(void) } -# The corresponding Unregister was not a stub, and this should be static. -#declare 26 aqua { -# void TkMacOSXRegisterOffScreenWindow(Window window, void *portPtr) -#} declare 27 aqua { int TkMacOSXResizable(TkWindow *winPtr) } @@ -976,19 +893,12 @@ declare 28 aqua { declare 29 aqua { void TkMacOSXSetScrollbarGrow(TkWindow *winPtr, int flag) } -declare 30 aqua { - void TkMacOSXSetUpClippingRgn(Drawable drawable) -} declare 31 aqua { void TkMacOSXSetUpGraphicsPort(GC gc, void *destPort) } declare 32 aqua { void TkMacOSXUpdateClipRgn(TkWindow *winPtr) } -# This was not implemented. Perhaps meant to be OffScreen ? -#declare 33 aqua { -# void TkMacOSXUnregisterMacWindow(void *portPtr) -#} declare 34 aqua { int TkMacOSXUseMenuID(short macID) } @@ -1041,16 +951,10 @@ declare 51 aqua { declare 52 aqua { void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag) } -declare 53 aqua { - unsigned long TkpGetMS(void) -} -# For Canvas3d, requested by Sean Woods -declare 54 aqua { - void *TkMacOSXDrawable(Drawable drawable) -} -declare 55 aqua { - int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) -} +# Made public as Tk_MacOSXGetNSWindowForDrawable +#declare 54 aqua { +# void *TkMacOSXDrawable(Drawable drawable) +#} ############################################################################## @@ -1594,348 +1498,350 @@ declare 6 macosx { Colormap XCreateColormap(Display *d, Window w, Visual *v, int i) } declare 7 macosx { - GContext XGContextFromGC(GC g) + Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, + XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2) } -# second parameter was of type KeyCode declare 8 macosx { - KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i) + Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, + unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, + XColor _Xconst *x2) } declare 9 macosx { - KeySym XStringToKeysym(_Xconst char *c) + GContext XGContextFromGC(GC g) } declare 10 macosx { - Window XRootWindow(Display *d, int i) + XHostAddress *XListHosts(Display *d, int *i, Bool *b) } +# second parameter was of type KeyCode declare 11 macosx { - XErrorHandler XSetErrorHandler(XErrorHandler x) + KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i) } declare 12 macosx { - Status XAllocColor(Display *d, Colormap c, XColor *xp) + KeySym XStringToKeysym(_Xconst char *c) } declare 13 macosx { - int XBell(Display *d, int i) + Window XRootWindow(Display *d, int i) } declare 14 macosx { - int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, - int i2, _Xconst unsigned char *c, int i3) + XErrorHandler XSetErrorHandler(XErrorHandler x) } declare 15 macosx { - int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, - XSetWindowAttributes *x) + Status XIconifyWindow(Display *d, Window w, int i) } declare 16 macosx { - int XConfigureWindow(Display *d, Window w, unsigned int i, - XWindowChanges *x) + Status XWithdrawWindow(Display *d, Window w, int i) } declare 17 macosx { - int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, - int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) + Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip) } declare 18 macosx { - int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, - int i2, unsigned int ui1, - unsigned int ui2, int i3, int i4, unsigned long ul) + Status XAllocColor(Display *d, Colormap c, XColor *xp) } declare 19 macosx { - Pixmap XCreateBitmapFromData(Display *display, Drawable d, - _Xconst char *data, unsigned int width, unsigned int height) + int XBell(Display *d, int i) } declare 20 macosx { - int XDefineCursor(Display *d, Window w, Cursor c) + int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, + int i2, _Xconst unsigned char *c, int i3) } declare 21 macosx { - int XDestroyWindow(Display *d, Window w) + int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, + XSetWindowAttributes *x) } declare 22 macosx { - int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, - unsigned int ui1, unsigned int ui2, int i3, int i4) + int XClearWindow(Display *d, Window w) } declare 23 macosx { - int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2) + int XConfigureWindow(Display *d, Window w, unsigned int i, + XWindowChanges *x) } declare 24 macosx { - int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, - unsigned int ui1, unsigned int ui2) + int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } declare 25 macosx { - int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, - unsigned int ui1, unsigned int ui2, int i3, int i4) + int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4, unsigned long ul) } declare 26 macosx { - int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, - int i1, int i2, int i3) + Pixmap XCreateBitmapFromData(Display *display, Drawable d, + _Xconst char *data, unsigned int width, unsigned int height) } declare 27 macosx { - int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i) + int XDefineCursor(Display *d, Window w, Cursor c) } declare 28 macosx { - int XFreeColormap(Display *d, Colormap c) + int XDeleteProperty(Display *d, Window w, Atom a) } declare 29 macosx { - int XFreeColors(Display *d, Colormap c, - unsigned long *ulp, int i, unsigned long ul) + int XDestroyWindow(Display *d, Window w) } declare 30 macosx { - int XFreeModifiermap(XModifierKeymap *x) + int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, + unsigned int ui1, unsigned int ui2, int i3, int i4) } declare 31 macosx { - Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, - int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, - unsigned int *ui4) + int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2) } declare 32 macosx { - int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, - Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, - unsigned long *ulp2, unsigned char **cpp) + int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, + unsigned int ui1, unsigned int ui2) } declare 33 macosx { - int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t) + int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, + unsigned int ui1, unsigned int ui2, int i3, int i4) } declare 34 macosx { - int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, - int i1, int i2, Window w2, Cursor c, Time t) + int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, + int i1, int i2, int i3) } declare 35 macosx { - KeyCode XKeysymToKeycode(Display *d, KeySym k) + int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i) } declare 36 macosx { - int XMapWindow(Display *d, Window w) + int XForceScreenSaver(Display *d, int i) } declare 37 macosx { - int XMoveResizeWindow(Display *d, Window w, int i1, int i2, - unsigned int ui1, unsigned int ui2) + int XFreeColormap(Display *d, Colormap c) } declare 38 macosx { - int XMoveWindow(Display *d, Window w, int i1, int i2) + int XFreeColors(Display *d, Colormap c, + unsigned long *ulp, int i, unsigned long ul) } declare 39 macosx { - Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, - int *i1, int *i2, int *i3, int *i4, unsigned int *ui) + int XFreeCursor(Display *d, Cursor c) } declare 40 macosx { - int XRaiseWindow(Display *d, Window w) + int XFreeModifiermap(XModifierKeymap *x) } declare 41 macosx { - int XRefreshKeyboardMapping(XMappingEvent *x) + Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, + int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, + unsigned int *ui4) } declare 42 macosx { - int XResizeWindow(Display *d, Window w, unsigned int ui1, - unsigned int ui2) + int XGetInputFocus(Display *d, Window *w, int *i) } declare 43 macosx { - int XSelectInput(Display *d, Window w, long l) + int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, + Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, + unsigned long *ulp2, unsigned char **cpp) } declare 44 macosx { - Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) + Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x) } declare 45 macosx { - int XSetIconName(Display *d, Window w, _Xconst char *c) + int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t) } declare 46 macosx { - int XSetInputFocus(Display *d, Window w, int i, Time t) + int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, + int i1, int i2, Window w2, Cursor c, Time t) } declare 47 macosx { - int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) + KeyCode XKeysymToKeycode(Display *d, KeySym k) } declare 48 macosx { - int XSetWindowBackground(Display *d, Window w, unsigned long ul) + Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2, + XColor *x1, XColor *x2) } declare 49 macosx { - int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) + int XMapWindow(Display *d, Window w) } declare 50 macosx { - int XSetWindowBorder(Display *d, Window w, unsigned long ul) + int XMoveResizeWindow(Display *d, Window w, int i1, int i2, + unsigned int ui1, unsigned int ui2) } declare 51 macosx { - int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) + int XMoveWindow(Display *d, Window w, int i1, int i2) } declare 52 macosx { - int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) + int XNextEvent(Display *d, XEvent *x) } declare 53 macosx { - int XSetWindowColormap(Display *d, Window w, Colormap c) + int XPutBackEvent(Display *d, XEvent *x) } declare 54 macosx { - int XUngrabKeyboard(Display *d, Time t) + int XQueryColors(Display *d, Colormap c, XColor *x, int i) } declare 55 macosx { - int XUngrabPointer(Display *d, Time t) + Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, + int *i1, int *i2, int *i3, int *i4, unsigned int *ui) } declare 56 macosx { - int XUnmapWindow(Display *d, Window w) + Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3, + Window **w4, unsigned int *ui) } declare 57 macosx { - int TkPutImage(unsigned long *colors, int ncolors, Display *display, - Drawable d, GC gc, XImage *image, int src_x, int src_y, - int dest_x, int dest_y, unsigned int width, unsigned int height) + int XRaiseWindow(Display *d, Window w) } declare 58 macosx { - Status XParseColor(Display *display, Colormap map, - _Xconst char *spec, XColor *colorPtr) + int XRefreshKeyboardMapping(XMappingEvent *x) } declare 59 macosx { - GC XCreateGC(Display *display, Drawable d, - unsigned long valuemask, XGCValues *values) + int XResizeWindow(Display *d, Window w, unsigned int ui1, + unsigned int ui2) } declare 60 macosx { - int XFreeGC(Display *display, GC gc) + int XSelectInput(Display *d, Window w, long l) } declare 61 macosx { - Atom XInternAtom(Display *display, _Xconst char *atom_name, - Bool only_if_exists) + Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) } declare 62 macosx { - int XSetBackground(Display *display, GC gc, unsigned long foreground) + int XSetCommand(Display *d, Window w, char **c, int i) } declare 63 macosx { - int XSetForeground(Display *display, GC gc, unsigned long foreground) + int XSetIconName(Display *d, Window w, _Xconst char *c) } declare 64 macosx { - int XSetClipMask(Display *display, GC gc, Pixmap pixmap) + int XSetInputFocus(Display *d, Window w, int i, Time t) } declare 65 macosx { - int XSetClipOrigin(Display *display, GC gc, - int clip_x_origin, int clip_y_origin) + int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) } declare 66 macosx { - int XSetTSOrigin(Display *display, GC gc, - int ts_x_origin, int ts_y_origin) + int XSetWindowBackground(Display *d, Window w, unsigned long ul) } declare 67 macosx { - int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values) + int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) } declare 68 macosx { - int XSetFont(Display *display, GC gc, Font font) + int XSetWindowBorder(Display *d, Window w, unsigned long ul) } declare 69 macosx { - int XSetArcMode(Display *display, GC gc, int arc_mode) + int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) } declare 70 macosx { - int XSetStipple(Display *display, GC gc, Pixmap stipple) + int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) } declare 71 macosx { - int XSetFillRule(Display *display, GC gc, int fill_rule) + int XSetWindowColormap(Display *d, Window w, Colormap c) } declare 72 macosx { - int XSetFillStyle(Display *display, GC gc, int fill_style) + Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, + int i2, int *i3, int *i4, Window *w3) } declare 73 macosx { - int XSetFunction(Display *display, GC gc, int function) + int XUngrabKeyboard(Display *d, Time t) } declare 74 macosx { - int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, - int line_style, int cap_style, int join_style) + int XUngrabPointer(Display *d, Time t) } declare 75 macosx { - int _XInitImageFuncPtrs(XImage *image) + int XUnmapWindow(Display *d, Window w) } declare 76 macosx { - XIC XCreateIC(XIM xim, ...) + int XWindowEvent(Display *d, Window w, long l, XEvent *x) } declare 77 macosx { - XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, - XVisualInfo *vinfo_template, int *nitems_return) + void XDestroyIC(XIC x) } declare 78 macosx { - void XSetWMClientMachine(Display *display, Window w, - XTextProperty *text_prop) + Bool XFilterEvent(XEvent *x, Window w) } declare 79 macosx { - Status XStringListToTextProperty(char **list, int count, - XTextProperty *text_prop_return) + int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i, + KeySym *k, Status *s) } declare 80 macosx { - int XDrawSegments(Display *display, Drawable d, GC gc, - XSegment *segments, int nsegments) + int TkPutImage(unsigned long *colors, int ncolors, Display *display, + Drawable d, GC gc, XImage *image, int src_x, int src_y, + int dest_x, int dest_y, unsigned int width, unsigned int height) } declare 81 macosx { - int XForceScreenSaver(Display *display, int mode) + int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, + int clip_y_origin, XRectangle rectangles[], int n, int ordering) } declare 82 macosx { - int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, - int x2, int y2) + Status XParseColor(Display *display, Colormap map, + _Xconst char *spec, XColor *colorPtr) } declare 83 macosx { - int XFillRectangle(Display *display, Drawable d, GC gc, - int x, int y, unsigned int width, unsigned int height) + GC XCreateGC(Display *display, Drawable d, + unsigned long valuemask, XGCValues *values) } declare 84 macosx { - int XClearWindow(Display *d, Window w) + int XFreeGC(Display *display, GC gc) } declare 85 macosx { - int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y) + Atom XInternAtom(Display *display, _Xconst char *atom_name, + Bool only_if_exists) } declare 86 macosx { - int XDrawPoints(Display *display, Drawable d, GC gc, XPoint *points, - int npoints, int mode) + int XSetBackground(Display *display, GC gc, unsigned long foreground) } declare 87 macosx { - int XWarpPointer(Display *display, Window src_w, Window dest_w, - int src_x, int src_y, unsigned int src_width, - unsigned int src_height, int dest_x, int dest_y) + int XSetForeground(Display *display, GC gc, unsigned long foreground) } declare 88 macosx { - int XQueryColor(Display *display, Colormap colormap, XColor *def_in_out) + int XSetClipMask(Display *display, GC gc, Pixmap pixmap) } declare 89 macosx { - int XQueryColors(Display *display, Colormap colormap, - XColor *defs_in_out, int ncolors) + int XSetClipOrigin(Display *display, GC gc, + int clip_x_origin, int clip_y_origin) } declare 90 macosx { - Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3, - Window **w4, unsigned int *ui) + int XSetTSOrigin(Display *display, GC gc, + int ts_x_origin, int ts_y_origin) } declare 91 macosx { - int XSync(Display *display, Bool discard) + int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values) } declare 92 macosx { - Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, - int i2, int *i3, int *i4, Window *w3) + int XSetFont(Display *display, GC gc, Font font) } declare 93 macosx { - int XDeleteProperty(Display *d, Window w, Atom a) + int XSetArcMode(Display *display, GC gc, int arc_mode) } declare 94 macosx { - int XFreeCursor(Display *d, Cursor c) + int XSetStipple(Display *display, GC gc, Pixmap stipple) } declare 95 macosx { - int XGetInputFocus(Display *d, Window *w, int *i) + int XSetFillRule(Display *display, GC gc, int fill_rule) } declare 96 macosx { - int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i, - KeySym *k, Status *s) + int XSetFillStyle(Display *display, GC gc, int fill_style) } declare 97 macosx { - int XNextEvent(Display *d, XEvent *x) + int XSetFunction(Display *display, GC gc, int function) } declare 98 macosx { - int XPutBackEvent(Display *d, XEvent *x) + int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, + int line_style, int cap_style, int join_style) } declare 99 macosx { - int XSetCommand(Display *d, Window w, char **c, int i) + int _XInitImageFuncPtrs(XImage *image) } declare 100 macosx { - int XWindowEvent(Display *d, Window w, long l, XEvent *x) + XIC XCreateIC(XIM xim, ...) } declare 101 macosx { - Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x) + XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, + XVisualInfo *vinfo_template, int *nitems_return) } declare 102 macosx { - Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip) + void XSetWMClientMachine(Display *display, Window w, + XTextProperty *text_prop) } declare 103 macosx { - Status XIconifyWindow(Display *d, Window w, int i) + Status XStringListToTextProperty(char **list, int count, + XTextProperty *text_prop_return) } declare 104 macosx { - Status XWithdrawWindow(Display *d, Window w, int i) + int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, + int x2, int y2) } declare 105 macosx { - XHostAddress *XListHosts(Display *d, int *i, Bool *b) + int XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, + unsigned int sw, unsigned int sh, int dx, int dy) } declare 106 macosx { - int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, - int clip_y_origin, XRectangle rectangles[], int n, int ordering) + int XFillRectangle(Display *display, Drawable d, GC gc, + int x, int y, unsigned int width, unsigned int height) } + +# New in Tk 8.6 declare 107 macosx { int XFlush(Display *display) } @@ -1955,18 +1861,21 @@ declare 112 macosx { XAfterFunction XSynchronize(Display *display, Bool onoff) } declare 113 macosx { - Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2, - XColor *x1, XColor *x2) + int XSync(Display *display, Bool discard) } declare 114 macosx { VisualID XVisualIDFromVisual(Visual *visual) } + +# For tktreectrl declare 120 macosx { int XOffsetRegion(Region rgn, int dx, int dy) } declare 121 macosx { int XUnionRegion(Region srca, Region srcb, Region dr_return) } + +# For 3dcanvas declare 122 macosx { Window XCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, @@ -1974,6 +1883,8 @@ declare 122 macosx { Visual *visual, unsigned long value_mask, XSetWindowAttributes *attributes) } + +# Various, e.g. for stub-enabled BLT declare 129 macosx { int XLowerWindow(Display *d, Window w) } @@ -1986,6 +1897,15 @@ declare 131 macosx { declare 132 macosx { int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n) } +declare 133 macosx { + int XDrawSegments(Display *d, Drawable dr, GC gc, XSegment *s, int n) +} +declare 134 macosx { + int XDrawPoint(Display *d, Drawable dr, GC gc, int x, int y) +} +declare 135 macosx { + int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m) +} declare 136 macosx { int XReparentWindow(Display *d, Window w, Window p, int x, int y) } @@ -2000,6 +1920,7 @@ declare 138 macosx { declare 139 macosx { int XPointInRegion(Region rgn, int x, int y) } +# For XIM declare 140 macosx { XVaNestedList XVaCreateNestedList(int dummy, ...) } @@ -2012,18 +1933,6 @@ declare 142 macosx { declare 143 macosx { void XSetICFocus(XIC xic) } -declare 144 macosx { - void XDestroyIC(XIC xic) -} -declare 145 macosx { - Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, - XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2) -} -declare 146 macosx { - Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, - unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, - XColor _Xconst *x2) -} declare 147 macosx { void XFreeFontSet(Display *display, XFontSet fontset) } diff --git a/generic/tkInt.h b/generic/tkInt.h index 84bf1aa..540b121 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -75,14 +75,6 @@ # endif #endif -#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7) -# define Tcl_WCharToUtfDString ((char * (*)(const WCHAR *, int len, Tcl_DString *))Tcl_UniCharToUtfDString) -# define Tcl_UtfToWCharDString ((WCHAR * (*)(const char *, int len, Tcl_DString *))Tcl_UtfToUniCharDString) -# define Tcl_Char16ToUtfDString Tcl_UniCharToUtfDString -# define Tcl_UtfToChar16DString Tcl_UtfToUniCharDString -# define TCL_COMBINE 0 -#endif - #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) # define TKFLEXARRAY #elif defined(__GNUC__) && (__GNUC__ > 2) @@ -91,10 +83,6 @@ # define TKFLEXARRAY 1 #endif -#if !defined(Tcl_GetParent) && (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7) -# define Tcl_GetParent Tcl_GetMaster -#endif - /* * Macros used to cast between pointers and integers (e.g. when storing an int * in ClientData), on 64-bit architectures they avoid gcc warning about "cast @@ -557,21 +545,6 @@ typedef struct TkDisplay { * the display when we no longer have any Tk * applications using it. */ - /* - * The following field were all added for Tk8.3 - */ - -#if TCL_MAJOR_VERSION < 9 -#if !defined(TK_NO_DEPRECATED) - int mouseButtonState; /* Current mouse button state for this - * display. NOT USED as of 8.6.10 */ - Window mouseButtonWindow; /* Window the button state was set in, added - * in Tk 8.4. */ -#else - int notused1; - XID notused2; -#endif /* !TK_NO_DEPRECATED */ -#endif Tk_Window warpWindow; Tk_Window warpMainwin; /* For finding the root window for warping * purposes. */ @@ -1321,21 +1294,13 @@ MODULE_SCOPE void TkInitEmbeddedConfigurationInformation( Tcl_Interp *interp); MODULE_SCOPE void TkDoWarpWrtWin(TkDisplay *dispPtr); MODULE_SCOPE void TkpWarpPointer(TkDisplay *dispPtr); -MODULE_SCOPE int TkListCreateFrame(void *clientData, - Tcl_Interp *interp, Tcl_Obj *listObj, - int toplevel, Tcl_Obj *nameObj); MODULE_SCOPE void TkRotatePoint(double originX, double originY, double sine, double cosine, double *xPtr, double *yPtr); MODULE_SCOPE int TkGetIntForIndex(Tcl_Obj *, Tcl_Size, int lastOK, Tcl_Size*); -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -# define TkNewIndexObj(value) Tcl_NewWideIntObj((Tcl_WideInt)(value + 1) - 1) -# define TK_OPTION_UNDERLINE_DEF(type, field) "-1", TCL_INDEX_NONE, offsetof(type, field), 0, NULL -#else -# define TkNewIndexObj(value) (((Tcl_Size)(value) == TCL_INDEX_NONE) ? Tcl_NewObj() : Tcl_NewWideIntObj((Tcl_WideInt)(value))) -# define TK_OPTION_UNDERLINE_DEF(type, field) NULL, TCL_INDEX_NONE, offsetof(type, field), TK_OPTION_NULL_OK, NULL -#endif +#define TkNewIndexObj(value) (((Tcl_Size)(value) == TCL_INDEX_NONE) ? Tcl_NewObj() : Tcl_NewWideIntObj((Tcl_WideInt)(value))) +#define TK_OPTION_UNDERLINE_DEF(type, field) NULL, TCL_INDEX_NONE, offsetof(type, field), TK_OPTION_NULL_OK, NULL #ifdef _WIN32 @@ -1377,15 +1342,6 @@ MODULE_SCOPE void TkpCopyRegion(TkRegion dst, TkRegion src); # define c_class class #endif -/* 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(src, ch) (size_t)(((int (*)(const char *, int *))Tcl_UtfToUniChar)(src, ch)) -# define TkUniCharToUtf(ch, src) (size_t)(((int (*)(int, char *))Tcl_UniCharToUtf)(ch, src)) -#else - MODULE_SCOPE size_t TkUtfToUniChar(const char *, int *); - MODULE_SCOPE size_t TkUniCharToUtf(int, char *); -#endif - #if defined(_WIN32) && !defined(STATIC_BUILD) && TCL_MAJOR_VERSION < 9 # define tcl_CreateFileHandler reserved9 #endif @@ -1402,7 +1358,6 @@ MODULE_SCOPE Tcl_ObjCmdProc TkUnsupported1ObjCmd; * For Tktest. */ MODULE_SCOPE Tcl_ObjCmdProc SquareObjCmd; -MODULE_SCOPE int TkOldTestInit(Tcl_Interp *interp); #if !(defined(_WIN32) || defined(MAC_OSX_TK)) #define TkplatformtestInit(x) TCL_OK #else diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index b4eea9e..42c679f 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -80,8 +80,8 @@ EXTERN TkCursor * TkCreateCursorFromData(Tk_Window tkwin, XColor fg, XColor bg); /* 13 */ EXTERN int TkCreateFrame(void *clientData, Tcl_Interp *interp, - int argc, const char *const *argv, - int toplevel, const char *appName); + Tcl_Size objc, Tcl_Obj *const objv[], + int type, const char *appName); /* 14 */ EXTERN Tk_Window TkCreateMainWindow(Tcl_Interp *interp, const char *screenName, const char *baseName); @@ -202,9 +202,7 @@ EXTERN void TkpClaimFocus(TkWindow *topLevelPtr, int force); EXTERN void TkpDisplayWarning(const char *msg, const char *title); /* 59 */ EXTERN void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name); -/* 60 */ -TK_DEPRECATED("renamed to Tk_GetOtherWindow") -TkWindow * TkpGetOtherWindow(TkWindow *winPtr); +/* Slot 60 is reserved */ /* 61 */ EXTERN TkWindow * TkpGetWrapperWindow(TkWindow *winPtr); /* 62 */ @@ -212,14 +210,10 @@ EXTERN int TkpInit(Tcl_Interp *interp); /* 63 */ EXTERN void TkpInitializeMenuBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable); -/* 64 */ -TK_DEPRECATED("renamed to Tk_MakeContainer") -void TkpMakeContainer(Tk_Window tkwin); +/* Slot 64 is reserved */ /* 65 */ EXTERN void TkpMakeMenuWindow(Tk_Window tkwin, int transient); -/* 66 */ -TK_DEPRECATED("renamed to Tk_MakeWindow") -Window TkpMakeWindow(TkWindow *winPtr, Window parent); +/* Slot 66 is reserved */ /* 67 */ EXTERN void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp, const char *menuName); @@ -238,14 +232,8 @@ EXTERN int TkPositionInTree(TkWindow *winPtr, TkWindow *treePtr); /* 73 */ EXTERN void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr); -/* 74 */ -TK_DEPRECATED("renamed to Tk_SetMainMenubar") -void TkpSetMainMenubar(Tcl_Interp *interp, - Tk_Window tkwin, const char *menuName); -/* 75 */ -TK_DEPRECATED("renamed to Tk_UseWindow") -int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, - const char *string); +/* Slot 74 is reserved */ +/* Slot 75 is reserved */ /* Slot 76 is reserved */ /* 77 */ EXTERN void TkQueueEventForAllChildren(TkWindow *winPtr, @@ -270,11 +258,7 @@ EXTERN void TkSelInit(Tk_Window tkwin); /* 83 */ EXTERN void TkSelPropProc(XEvent *eventPtr); /* Slot 84 is reserved */ -/* 85 */ -TK_DEPRECATED("renamed to Tk_SetWindowMenubar") -void TkSetWindowMenuBar(Tcl_Interp *interp, - Tk_Window tkwin, const char *oldMenuName, - const char *menuName); +/* Slot 85 is reserved */ /* 86 */ EXTERN KeySym TkStringToKeysym(const char *name); /* 87 */ @@ -335,10 +319,7 @@ EXTERN const char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 110 */ EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont); -/* 111 */ -TK_DEPRECATED("renamed to Tk_GetSystemDefault") -Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, - const char *dbName, const char *className); +/* Slot 111 is reserved */ /* 112 */ EXTERN void TkpMenuThreadInit(void); /* 113 */ @@ -359,21 +340,15 @@ EXTERN int XSetRegion(Display *display, GC gc, Region rgn); EXTERN int XUnionRectWithRegion(XRectangle *rect, Region src, Region dr_return); /* Slot 120 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ /* 121 */ EXTERN Pixmap TkpCreateNativeBitmap(Display *display, const void *source); -#endif /* AQUA */ -#ifdef MAC_OSX_TK /* AQUA */ /* 122 */ EXTERN void TkpDefineNativeBitmaps(void); -#endif /* AQUA */ /* Slot 123 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ /* 124 */ EXTERN Pixmap TkpGetNativeAppBitmap(Display *display, const char *name, int *width, int *height); -#endif /* AQUA */ /* Slot 125 is reserved */ /* Slot 126 is reserved */ /* Slot 127 is reserved */ @@ -384,11 +359,7 @@ EXTERN Pixmap TkpGetNativeAppBitmap(Display *display, /* Slot 132 is reserved */ /* Slot 133 is reserved */ /* Slot 134 is reserved */ -/* 135 */ -TK_DEPRECATED("renamed to Tk_DrawHighlightBorder") -void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, - GC bgGC, int highlightWidth, - Drawable drawable); +/* Slot 135 is reserved */ /* 136 */ EXTERN void TkSetFocusWin(TkWindow *winPtr, int force); /* 137 */ @@ -591,7 +562,7 @@ typedef struct TkIntStubs { void (*reserved10)(void); void (*reserved11)(void); TkCursor * (*tkCreateCursorFromData) (Tk_Window tkwin, const char *source, const char *mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg); /* 12 */ - int (*tkCreateFrame) (void *clientData, Tcl_Interp *interp, int argc, const char *const *argv, int toplevel, const char *appName); /* 13 */ + int (*tkCreateFrame) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], int type, const char *appName); /* 13 */ Tk_Window (*tkCreateMainWindow) (Tcl_Interp *interp, const char *screenName, const char *baseName); /* 14 */ Time (*tkCurrentTime) (TkDisplay *dispPtr); /* 15 */ void (*tkDeleteAllImages) (TkMainInfo *mainPtr); /* 16 */ @@ -638,13 +609,13 @@ typedef struct TkIntStubs { void (*tkpClaimFocus) (TkWindow *topLevelPtr, int force); /* 57 */ void (*tkpDisplayWarning) (const char *msg, const char *title); /* 58 */ void (*tkpGetAppName) (Tcl_Interp *interp, Tcl_DString *name); /* 59 */ - TCL_DEPRECATED_API("renamed to Tk_GetOtherWindow") TkWindow * (*tkpGetOtherWindow) (TkWindow *winPtr); /* 60 */ + void (*reserved60)(void); TkWindow * (*tkpGetWrapperWindow) (TkWindow *winPtr); /* 61 */ int (*tkpInit) (Tcl_Interp *interp); /* 62 */ void (*tkpInitializeMenuBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable); /* 63 */ - TCL_DEPRECATED_API("renamed to Tk_MakeContainer") void (*tkpMakeContainer) (Tk_Window tkwin); /* 64 */ + void (*reserved64)(void); void (*tkpMakeMenuWindow) (Tk_Window tkwin, int transient); /* 65 */ - TCL_DEPRECATED_API("renamed to Tk_MakeWindow") Window (*tkpMakeWindow) (TkWindow *winPtr, Window parent); /* 66 */ + void (*reserved66)(void); void (*tkpMenuNotifyToplevelCreate) (Tcl_Interp *interp, const char *menuName); /* 67 */ TkDisplay * (*tkpOpenDisplay) (const char *display_name); /* 68 */ int (*tkPointerEvent) (XEvent *eventPtr, TkWindow *winPtr); /* 69 */ @@ -652,8 +623,8 @@ typedef struct TkIntStubs { double (*tkPolygonToPoint) (double *polyPtr, int numPoints, double *pointPtr); /* 71 */ int (*tkPositionInTree) (TkWindow *winPtr, TkWindow *treePtr); /* 72 */ void (*tkpRedirectKeyEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 73 */ - TCL_DEPRECATED_API("renamed to Tk_SetMainMenubar") void (*tkpSetMainMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 74 */ - TCL_DEPRECATED_API("renamed to Tk_UseWindow") int (*tkpUseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 75 */ + void (*reserved74)(void); + void (*reserved75)(void); void (*reserved76)(void); void (*tkQueueEventForAllChildren) (TkWindow *winPtr, XEvent *eventPtr); /* 77 */ int (*tkReadBitmapFile) (Display *display, Drawable d, const char *filename, unsigned int *width_return, unsigned int *height_return, Pixmap *bitmap_return, int *x_hot_return, int *y_hot_return); /* 78 */ @@ -663,7 +634,7 @@ typedef struct TkIntStubs { void (*tkSelInit) (Tk_Window tkwin); /* 82 */ void (*tkSelPropProc) (XEvent *eventPtr); /* 83 */ void (*reserved84)(void); - TCL_DEPRECATED_API("renamed to Tk_SetWindowMenubar") void (*tkSetWindowMenuBar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 85 */ + void (*reserved85)(void); KeySym (*tkStringToKeysym) (const char *name); /* 86 */ int (*tkThickPolyLineToArea) (double *coordPtr, int numPoints, double width, int capStyle, int joinStyle, double *rectPtr); /* 87 */ void (*tkWmAddToColormapWindows) (TkWindow *winPtr); /* 88 */ @@ -689,7 +660,7 @@ typedef struct TkIntStubs { int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */ const char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ - TCL_DEPRECATED_API("renamed to Tk_GetSystemDefault") Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ + void (*reserved111)(void); void (*tkpMenuThreadInit) (void); /* 112 */ int (*xClipBox) (Region rgn, XRectangle *rect_return); /* 113 */ Region (*xCreateRegion) (void); /* 114 */ @@ -699,37 +670,10 @@ typedef struct TkIntStubs { int (*xSetRegion) (Display *display, GC gc, Region rgn); /* 118 */ int (*xUnionRectWithRegion) (XRectangle *rect, Region src, Region dr_return); /* 119 */ void (*reserved120)(void); -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved121)(void); -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - void (*reserved121)(void); -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - void (*reserved121)(void); /* Dummy entry for stubs table backwards compatibility */ Pixmap (*tkpCreateNativeBitmap) (Display *display, const void *source); /* 121 */ -#endif /* AQUA */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved122)(void); -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - void (*reserved122)(void); -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - void (*reserved122)(void); /* Dummy entry for stubs table backwards compatibility */ void (*tkpDefineNativeBitmaps) (void); /* 122 */ -#endif /* AQUA */ void (*reserved123)(void); -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved124)(void); -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - void (*reserved124)(void); -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - void (*reserved124)(void); /* Dummy entry for stubs table backwards compatibility */ Pixmap (*tkpGetNativeAppBitmap) (Display *display, const char *name, int *width, int *height); /* 124 */ -#endif /* AQUA */ void (*reserved125)(void); void (*reserved126)(void); void (*reserved127)(void); @@ -740,7 +684,7 @@ typedef struct TkIntStubs { void (*reserved132)(void); void (*reserved133)(void); void (*reserved134)(void); - TCL_DEPRECATED_API("renamed to Tk_DrawHighlightBorder") void (*tkpDrawHighlightBorder) (Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 135 */ + void (*reserved135)(void); void (*tkSetFocusWin) (TkWindow *winPtr, int force); /* 136 */ void (*tkpSetKeycodeAndState) (Tk_Window tkwin, KeySym keySym, XEvent *eventPtr); /* 137 */ KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */ @@ -924,20 +868,17 @@ extern const TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkpDisplayWarning) /* 58 */ #define TkpGetAppName \ (tkIntStubsPtr->tkpGetAppName) /* 59 */ -#define TkpGetOtherWindow \ - (tkIntStubsPtr->tkpGetOtherWindow) /* 60 */ +/* Slot 60 is reserved */ #define TkpGetWrapperWindow \ (tkIntStubsPtr->tkpGetWrapperWindow) /* 61 */ #define TkpInit \ (tkIntStubsPtr->tkpInit) /* 62 */ #define TkpInitializeMenuBindings \ (tkIntStubsPtr->tkpInitializeMenuBindings) /* 63 */ -#define TkpMakeContainer \ - (tkIntStubsPtr->tkpMakeContainer) /* 64 */ +/* Slot 64 is reserved */ #define TkpMakeMenuWindow \ (tkIntStubsPtr->tkpMakeMenuWindow) /* 65 */ -#define TkpMakeWindow \ - (tkIntStubsPtr->tkpMakeWindow) /* 66 */ +/* Slot 66 is reserved */ #define TkpMenuNotifyToplevelCreate \ (tkIntStubsPtr->tkpMenuNotifyToplevelCreate) /* 67 */ #define TkpOpenDisplay \ @@ -952,10 +893,8 @@ extern const TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkPositionInTree) /* 72 */ #define TkpRedirectKeyEvent \ (tkIntStubsPtr->tkpRedirectKeyEvent) /* 73 */ -#define TkpSetMainMenubar \ - (tkIntStubsPtr->tkpSetMainMenubar) /* 74 */ -#define TkpUseWindow \ - (tkIntStubsPtr->tkpUseWindow) /* 75 */ +/* Slot 74 is reserved */ +/* Slot 75 is reserved */ /* Slot 76 is reserved */ #define TkQueueEventForAllChildren \ (tkIntStubsPtr->tkQueueEventForAllChildren) /* 77 */ @@ -972,8 +911,7 @@ extern const TkIntStubs *tkIntStubsPtr; #define TkSelPropProc \ (tkIntStubsPtr->tkSelPropProc) /* 83 */ /* Slot 84 is reserved */ -#define TkSetWindowMenuBar \ - (tkIntStubsPtr->tkSetWindowMenuBar) /* 85 */ +/* Slot 85 is reserved */ #define TkStringToKeysym \ (tkIntStubsPtr->tkStringToKeysym) /* 86 */ #define TkThickPolyLineToArea \ @@ -1024,8 +962,7 @@ extern const TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkpGetString) /* 109 */ #define TkpGetSubFonts \ (tkIntStubsPtr->tkpGetSubFonts) /* 110 */ -#define TkpGetSystemDefault \ - (tkIntStubsPtr->tkpGetSystemDefault) /* 111 */ +/* Slot 111 is reserved */ #define TkpMenuThreadInit \ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */ #define XClipBox \ @@ -1043,19 +980,13 @@ extern const TkIntStubs *tkIntStubsPtr; #define XUnionRectWithRegion \ (tkIntStubsPtr->xUnionRectWithRegion) /* 119 */ /* Slot 120 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ #define TkpCreateNativeBitmap \ (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */ -#endif /* AQUA */ -#ifdef MAC_OSX_TK /* AQUA */ #define TkpDefineNativeBitmaps \ (tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */ -#endif /* AQUA */ /* Slot 123 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ #define TkpGetNativeAppBitmap \ (tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */ -#endif /* AQUA */ /* Slot 125 is reserved */ /* Slot 126 is reserved */ /* Slot 127 is reserved */ @@ -1066,8 +997,7 @@ extern const TkIntStubs *tkIntStubsPtr; /* Slot 132 is reserved */ /* Slot 133 is reserved */ /* Slot 134 is reserved */ -#define TkpDrawHighlightBorder \ - (tkIntStubsPtr->tkpDrawHighlightBorder) /* 135 */ +/* Slot 135 is reserved */ #define TkSetFocusWin \ (tkIntStubsPtr->tkSetFocusWin) /* 136 */ #define TkpSetKeycodeAndState \ @@ -1179,39 +1109,17 @@ extern const TkIntStubs *tkIntStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkpCmapStressed_ -#undef TkpSync_ -#undef TkUnixContainerId_ -#undef TkUnixDoOneXEvent_ -#undef TkUnixSetMenubar_ -#undef TkWmCleanup_ -#undef TkSendCleanup_ -#undef TkpTestsendCmd_ -#undef TkSetWindowMenuBar -#undef TkpDrawHighlightBorder -#undef TkpUseWindow -#undef TkpSetMainMenubar -#undef TkpGetOtherWindow -#undef TkpGetSystemDefault -#undef TkpMakeContainer -#undef TkpMakeWindow - -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION == 8) -# define TkSetWindowMenuBar Tk_SetWindowMenubar -# define TkpDrawHighlightBorder Tk_DrawHighlightBorder -# define TkpUseWindow Tk_UseWindow -# define TkpSetMainMenubar Tk_SetMainMenubar -# define TkpGetOtherWindow ((TkWindow *(*)(TkWindow *))(void *)Tk_GetOtherWindow) -# define TkpGetSystemDefault Tk_GetSystemDefault -# define TkpMakeContainer Tk_MakeContainer -# define TkpMakeWindow ((Window (*)(TkWindow *, Window))(void *)Tk_MakeWindow) -#endif - #if !defined(MAC_OSX_TK) && !defined(USE_TK_STUBS) # undef TkpWillDrawWidget # undef TkpRedrawWidget +# undef TkpDefineNativeBitmaps +# undef TkpCreateNativeBitmap +# undef TkpGetNativeAppBitmap # define TkpWillDrawWidget(w) 0 # define TkpRedrawWidget(w) +# define TkpDefineNativeBitmaps() +# define TkpCreateNativeBitmap(display, source) None +# define TkpGetNativeAppBitmap(display, name, w, h) None #endif #endif /* _TKINTDECLS */ diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index c3164da..a684b21 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -36,8 +36,7 @@ extern "C" { #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ /* 0 */ -EXTERN char * TkAlignImageData(XImage *image, int alignment, - int bitOrder); +EXTERN void TkCreateXEventSource(void); /* Slot 1 is reserved */ /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, @@ -114,7 +113,8 @@ EXTERN void TkWinDialogDebug(int debug); EXTERN Tcl_Obj * TkWinGetMenuSystemDefault(Tk_Window tkwin, const char *dbName, const char *className); /* 33 */ -EXTERN int TkWinGetPlatformId(void); +EXTERN char * TkAlignImageData(XImage *image, int alignment, + int bitOrder); /* 34 */ EXTERN void TkWinSetHINSTANCE(HINSTANCE hInstance); /* 35 */ @@ -122,8 +122,7 @@ EXTERN int TkWinGetPlatformTheme(void); /* 36 */ EXTERN LRESULT __stdcall TkWinChildProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); -/* 37 */ -EXTERN void TkCreateXEventSource(void); +/* Slot 37 is reserved */ /* 38 */ EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); /* 39 */ @@ -146,30 +145,31 @@ EXTERN int TkpTestsendCmd(void *clientData, Tcl_Interp *interp, EXTERN Tk_Window TkpGetCapture(void); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ -/* 0 */ -EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, - int active); -/* Slot 1 is reserved */ +/* Slot 0 is reserved */ +/* 1 */ +EXTERN void TkAboutDlg(void); /* 2 */ -EXTERN void TkGenerateActivateEvents_(TkWindow *winPtr, +EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); /* 3 */ -EXTERN void TkPointerDeadWindow(TkWindow *winPtr); +EXTERN unsigned long TkpGetMS(void); /* 4 */ -EXTERN void TkpSetCapture(TkWindow *winPtr); +EXTERN void TkPointerDeadWindow(TkWindow *winPtr); /* 5 */ EXTERN void TkpSetCursor(TkpCursor cursor); /* 6 */ -EXTERN void TkpWmSetState(TkWindow *winPtr, int state); +EXTERN int TkpScanWindowId(Tcl_Interp *interp, + const char *string, Window *idPtr); /* 7 */ -EXTERN void TkAboutDlg(void); +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* 8 */ EXTERN unsigned int TkMacOSXButtonKeyState(void); /* 9 */ EXTERN void TkMacOSXClearMenubarActive(void); /* 10 */ EXTERN int TkMacOSXDispatchMenuEvent(int menuID, int index); -/* Slot 11 is reserved */ +/* 11 */ +EXTERN void TkpSetCapture(TkWindow *winPtr); /* 12 */ EXTERN void TkMacOSXHandleTearoffMenu(void); /* Slot 13 is reserved */ @@ -188,9 +188,7 @@ EXTERN void TkMacOSXHandleMenuSelect(short theMenu, /* 21 */ EXTERN void TkMacOSXInvalidateWindow(MacDrawable *macWin, int flag); -/* 22 */ -EXTERN int TkMacOSXIsCharacterMissing(Tk_Font tkfont, - unsigned int searchChar); +/* Slot 22 is reserved */ /* 23 */ EXTERN void TkMacOSXMakeRealWindowExist(TkWindow *winPtr); /* 24 */ @@ -204,8 +202,7 @@ EXTERN int TkMacOSXResizable(TkWindow *winPtr); EXTERN void TkMacOSXSetHelpMenuItemCount(void); /* 29 */ EXTERN void TkMacOSXSetScrollbarGrow(TkWindow *winPtr, int flag); -/* 30 */ -EXTERN void TkMacOSXSetUpClippingRgn(Drawable drawable); +/* Slot 30 is reserved */ /* 31 */ EXTERN void TkMacOSXSetUpGraphicsPort(GC gc, void *destPort); /* 32 */ @@ -251,13 +248,6 @@ EXTERN int TkGenerateButtonEvent(int x, int y, Window window, EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin); /* 52 */ EXTERN void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag); -/* 53 */ -EXTERN unsigned long TkpGetMS(void); -/* 54 */ -EXTERN void * TkMacOSXDrawable(Drawable drawable); -/* 55 */ -EXTERN int TkpScanWindowId(Tcl_Interp *interp, - const char *string, Window *idPtr); #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ /* 0 */ @@ -266,29 +256,20 @@ EXTERN void TkCreateXEventSource(void); /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); -/* 3 */ -EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); -/* 4 */ -EXTERN void TkpSync(Display *display); -/* 5 */ -EXTERN Window TkUnixContainerId(TkWindow *winPtr); +/* Slot 3 is reserved */ +/* Slot 4 is reserved */ +/* Slot 5 is reserved */ /* 6 */ -EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); -/* 7 */ -EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); -/* 8 */ EXTERN int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr); +/* Slot 7 is reserved */ +/* Slot 8 is reserved */ /* 9 */ -EXTERN void TkWmCleanup(TkDisplay *dispPtr); -/* 10 */ -EXTERN void TkSendCleanup(TkDisplay *dispPtr); -/* Slot 11 is reserved */ -/* 12 */ EXTERN int TkpWmSetState(TkWindow *winPtr, int state); -/* 13 */ -EXTERN int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, - Tcl_Size objc, Tcl_Obj *const objv[]); +/* Slot 10 is reserved */ +/* Slot 11 is reserved */ +/* Slot 12 is reserved */ +/* Slot 13 is reserved */ /* Slot 14 is reserved */ /* Slot 15 is reserved */ /* Slot 16 is reserved */ @@ -314,19 +295,19 @@ EXTERN int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, /* Slot 36 is reserved */ /* Slot 37 is reserved */ /* 38 */ -EXTERN int TkpCmapStressed_(Tk_Window tkwin, Colormap colormap); +EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); /* 39 */ -EXTERN void TkpSync_(Display *display); +EXTERN void TkpSync(Display *display); /* 40 */ -EXTERN Window TkUnixContainerId_(TkWindow *winPtr); +EXTERN Window TkUnixContainerId(TkWindow *winPtr); /* 41 */ -EXTERN int TkUnixDoOneXEvent_(Tcl_Time *timePtr); +EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); /* 42 */ -EXTERN void TkUnixSetMenubar_(Tk_Window tkwin, Tk_Window menubar); +EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); /* 43 */ -EXTERN void TkWmCleanup_(TkDisplay *dispPtr); +EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* 44 */ -EXTERN void TkSendCleanup_(TkDisplay *dispPtr); +EXTERN void TkSendCleanup(TkDisplay *dispPtr); /* 45 */ EXTERN int TkpTestsendCmd(void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); @@ -337,7 +318,7 @@ typedef struct TkIntPlatStubs { void *hooks; #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ - char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 0 */ + void (*tkCreateXEventSource) (void); /* 0 */ void (*reserved1)(void); void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ unsigned long (*tkpGetMS) (void); /* 3 */ @@ -370,11 +351,11 @@ typedef struct TkIntPlatStubs { void (*tkWinSetForegroundWindow) (TkWindow *winPtr); /* 30 */ void (*tkWinDialogDebug) (int debug); /* 31 */ Tcl_Obj * (*tkWinGetMenuSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 32 */ - int (*tkWinGetPlatformId) (void); /* 33 */ + char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 33 */ void (*tkWinSetHINSTANCE) (HINSTANCE hInstance); /* 34 */ int (*tkWinGetPlatformTheme) (void); /* 35 */ LRESULT (__stdcall *tkWinChildProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 36 */ - void (*tkCreateXEventSource) (void); /* 37 */ + void (*reserved37)(void); int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */ void (*tkpSync) (Display *display); /* 39 */ Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ @@ -387,18 +368,18 @@ typedef struct TkIntPlatStubs { Tk_Window (*tkpGetCapture) (void); /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 0 */ - void (*reserved1)(void); - void (*tkGenerateActivateEvents_) (TkWindow *winPtr, int active); /* 2 */ - void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 3 */ - void (*tkpSetCapture) (TkWindow *winPtr); /* 4 */ + void (*reserved0)(void); + void (*tkAboutDlg) (void); /* 1 */ + void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ + unsigned long (*tkpGetMS) (void); /* 3 */ + void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 4 */ void (*tkpSetCursor) (TkpCursor cursor); /* 5 */ - void (*tkpWmSetState) (TkWindow *winPtr, int state); /* 6 */ - void (*tkAboutDlg) (void); /* 7 */ + int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ unsigned int (*tkMacOSXButtonKeyState) (void); /* 8 */ void (*tkMacOSXClearMenubarActive) (void); /* 9 */ int (*tkMacOSXDispatchMenuEvent) (int menuID, int index); /* 10 */ - void (*reserved11)(void); + void (*tkpSetCapture) (TkWindow *winPtr); /* 11 */ void (*tkMacOSXHandleTearoffMenu) (void); /* 12 */ void (*reserved13)(void); int (*tkMacOSXDoHLEvent) (void *theEvent); /* 14 */ @@ -409,7 +390,7 @@ typedef struct TkIntPlatStubs { void (*reserved19)(void); void (*reserved20)(void); void (*tkMacOSXInvalidateWindow) (MacDrawable *macWin, int flag); /* 21 */ - int (*tkMacOSXIsCharacterMissing) (Tk_Font tkfont, unsigned int searchChar); /* 22 */ + void (*reserved22)(void); void (*tkMacOSXMakeRealWindowExist) (TkWindow *winPtr); /* 23 */ void * (*tkMacOSXMakeStippleMap) (Drawable d1, Drawable d2); /* 24 */ void (*tkMacOSXMenuClick) (void); /* 25 */ @@ -417,7 +398,7 @@ typedef struct TkIntPlatStubs { int (*tkMacOSXResizable) (TkWindow *winPtr); /* 27 */ void (*tkMacOSXSetHelpMenuItemCount) (void); /* 28 */ void (*tkMacOSXSetScrollbarGrow) (TkWindow *winPtr, int flag); /* 29 */ - void (*tkMacOSXSetUpClippingRgn) (Drawable drawable); /* 30 */ + void (*reserved30)(void); void (*tkMacOSXSetUpGraphicsPort) (GC gc, void *destPort); /* 31 */ void (*tkMacOSXUpdateClipRgn) (TkWindow *winPtr); /* 32 */ void (*reserved33)(void); @@ -440,25 +421,22 @@ typedef struct TkIntPlatStubs { int (*tkGenerateButtonEvent) (int x, int y, Window window, unsigned int state); /* 50 */ void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */ void (*tkMacOSXSetDrawingEnabled) (TkWindow *winPtr, int flag); /* 52 */ - unsigned long (*tkpGetMS) (void); /* 53 */ - void * (*tkMacOSXDrawable) (Drawable drawable); /* 54 */ - int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 55 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ void (*tkCreateXEventSource) (void); /* 0 */ void (*reserved1)(void); void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ - int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 3 */ - void (*tkpSync) (Display *display); /* 4 */ - Window (*tkUnixContainerId) (TkWindow *winPtr); /* 5 */ - int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 6 */ - void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 7 */ - int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 8 */ - void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */ - void (*tkSendCleanup) (TkDisplay *dispPtr); /* 10 */ + void (*reserved3)(void); + void (*reserved4)(void); + void (*reserved5)(void); + int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ + void (*reserved7)(void); + void (*reserved8)(void); + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */ + void (*reserved10)(void); void (*reserved11)(void); - int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 12 */ - int (*tkpTestsendCmd_) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 13 */ + void (*reserved12)(void); + void (*reserved13)(void); void (*reserved14)(void); void (*reserved15)(void); void (*reserved16)(void); @@ -483,13 +461,13 @@ typedef struct TkIntPlatStubs { void (*reserved35)(void); void (*reserved36)(void); void (*reserved37)(void); - int (*tkpCmapStressed_) (Tk_Window tkwin, Colormap colormap); /* 38 */ - void (*tkpSync_) (Display *display); /* 39 */ - Window (*tkUnixContainerId_) (TkWindow *winPtr); /* 40 */ - int (*tkUnixDoOneXEvent_) (Tcl_Time *timePtr); /* 41 */ - void (*tkUnixSetMenubar_) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ - void (*tkWmCleanup_) (TkDisplay *dispPtr); /* 43 */ - void (*tkSendCleanup_) (TkDisplay *dispPtr); /* 44 */ + int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */ + void (*tkpSync) (Display *display); /* 39 */ + Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ + int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */ + void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ + void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ + void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */ #endif /* X11 */ } TkIntPlatStubs; @@ -507,8 +485,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; */ #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ -#define TkAlignImageData \ - (tkIntPlatStubsPtr->tkAlignImageData) /* 0 */ +#define TkCreateXEventSource \ + (tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */ /* Slot 1 is reserved */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ @@ -572,16 +550,15 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkWinDialogDebug) /* 31 */ #define TkWinGetMenuSystemDefault \ (tkIntPlatStubsPtr->tkWinGetMenuSystemDefault) /* 32 */ -#define TkWinGetPlatformId \ - (tkIntPlatStubsPtr->tkWinGetPlatformId) /* 33 */ +#define TkAlignImageData \ + (tkIntPlatStubsPtr->tkAlignImageData) /* 33 */ #define TkWinSetHINSTANCE \ (tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */ #define TkWinGetPlatformTheme \ (tkIntPlatStubsPtr->tkWinGetPlatformTheme) /* 35 */ #define TkWinChildProc \ (tkIntPlatStubsPtr->tkWinChildProc) /* 36 */ -#define TkCreateXEventSource \ - (tkIntPlatStubsPtr->tkCreateXEventSource) /* 37 */ +/* Slot 37 is reserved */ #define TkpCmapStressed \ (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */ #define TkpSync \ @@ -603,28 +580,29 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpGetCapture) /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ +/* Slot 0 is reserved */ +#define TkAboutDlg \ + (tkIntPlatStubsPtr->tkAboutDlg) /* 1 */ #define TkGenerateActivateEvents \ - (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */ -/* Slot 1 is reserved */ -#define TkGenerateActivateEvents_ \ - (tkIntPlatStubsPtr->tkGenerateActivateEvents_) /* 2 */ + (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ +#define TkpGetMS \ + (tkIntPlatStubsPtr->tkpGetMS) /* 3 */ #define TkPointerDeadWindow \ - (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */ -#define TkpSetCapture \ - (tkIntPlatStubsPtr->tkpSetCapture) /* 4 */ + (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 4 */ #define TkpSetCursor \ (tkIntPlatStubsPtr->tkpSetCursor) /* 5 */ +#define TkpScanWindowId \ + (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ #define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 6 */ -#define TkAboutDlg \ - (tkIntPlatStubsPtr->tkAboutDlg) /* 7 */ + (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ #define TkMacOSXButtonKeyState \ (tkIntPlatStubsPtr->tkMacOSXButtonKeyState) /* 8 */ #define TkMacOSXClearMenubarActive \ (tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */ #define TkMacOSXDispatchMenuEvent \ (tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */ -/* Slot 11 is reserved */ +#define TkpSetCapture \ + (tkIntPlatStubsPtr->tkpSetCapture) /* 11 */ #define TkMacOSXHandleTearoffMenu \ (tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */ /* Slot 13 is reserved */ @@ -641,8 +619,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 20 is reserved */ #define TkMacOSXInvalidateWindow \ (tkIntPlatStubsPtr->tkMacOSXInvalidateWindow) /* 21 */ -#define TkMacOSXIsCharacterMissing \ - (tkIntPlatStubsPtr->tkMacOSXIsCharacterMissing) /* 22 */ +/* Slot 22 is reserved */ #define TkMacOSXMakeRealWindowExist \ (tkIntPlatStubsPtr->tkMacOSXMakeRealWindowExist) /* 23 */ #define TkMacOSXMakeStippleMap \ @@ -656,8 +633,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkMacOSXSetHelpMenuItemCount) /* 28 */ #define TkMacOSXSetScrollbarGrow \ (tkIntPlatStubsPtr->tkMacOSXSetScrollbarGrow) /* 29 */ -#define TkMacOSXSetUpClippingRgn \ - (tkIntPlatStubsPtr->tkMacOSXSetUpClippingRgn) /* 30 */ +/* Slot 30 is reserved */ #define TkMacOSXSetUpGraphicsPort \ (tkIntPlatStubsPtr->tkMacOSXSetUpGraphicsPort) /* 31 */ #define TkMacOSXUpdateClipRgn \ @@ -699,12 +675,6 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */ #define TkMacOSXSetDrawingEnabled \ (tkIntPlatStubsPtr->tkMacOSXSetDrawingEnabled) /* 52 */ -#define TkpGetMS \ - (tkIntPlatStubsPtr->tkpGetMS) /* 53 */ -#define TkMacOSXDrawable \ - (tkIntPlatStubsPtr->tkMacOSXDrawable) /* 54 */ -#define TkpScanWindowId \ - (tkIntPlatStubsPtr->tkpScanWindowId) /* 55 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ #define TkCreateXEventSource \ @@ -712,27 +682,19 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 1 is reserved */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ -#define TkpCmapStressed \ - (tkIntPlatStubsPtr->tkpCmapStressed) /* 3 */ -#define TkpSync \ - (tkIntPlatStubsPtr->tkpSync) /* 4 */ -#define TkUnixContainerId \ - (tkIntPlatStubsPtr->tkUnixContainerId) /* 5 */ -#define TkUnixDoOneXEvent \ - (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 6 */ -#define TkUnixSetMenubar \ - (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 7 */ +/* Slot 3 is reserved */ +/* Slot 4 is reserved */ +/* Slot 5 is reserved */ #define TkpScanWindowId \ - (tkIntPlatStubsPtr->tkpScanWindowId) /* 8 */ -#define TkWmCleanup \ - (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */ -#define TkSendCleanup \ - (tkIntPlatStubsPtr->tkSendCleanup) /* 10 */ -/* Slot 11 is reserved */ + (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ +/* Slot 7 is reserved */ +/* Slot 8 is reserved */ #define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 12 */ -#define TkpTestsendCmd_ \ - (tkIntPlatStubsPtr->tkpTestsendCmd_) /* 13 */ + (tkIntPlatStubsPtr->tkpWmSetState) /* 9 */ +/* Slot 10 is reserved */ +/* Slot 11 is reserved */ +/* Slot 12 is reserved */ +/* Slot 13 is reserved */ /* Slot 14 is reserved */ /* Slot 15 is reserved */ /* Slot 16 is reserved */ @@ -757,20 +719,20 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 35 is reserved */ /* Slot 36 is reserved */ /* Slot 37 is reserved */ -#define TkpCmapStressed_ \ - (tkIntPlatStubsPtr->tkpCmapStressed_) /* 38 */ -#define TkpSync_ \ - (tkIntPlatStubsPtr->tkpSync_) /* 39 */ -#define TkUnixContainerId_ \ - (tkIntPlatStubsPtr->tkUnixContainerId_) /* 40 */ -#define TkUnixDoOneXEvent_ \ - (tkIntPlatStubsPtr->tkUnixDoOneXEvent_) /* 41 */ -#define TkUnixSetMenubar_ \ - (tkIntPlatStubsPtr->tkUnixSetMenubar_) /* 42 */ -#define TkWmCleanup_ \ - (tkIntPlatStubsPtr->tkWmCleanup_) /* 43 */ -#define TkSendCleanup_ \ - (tkIntPlatStubsPtr->tkSendCleanup_) /* 44 */ +#define TkpCmapStressed \ + (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */ +#define TkpSync \ + (tkIntPlatStubsPtr->tkpSync) /* 39 */ +#define TkUnixContainerId \ + (tkIntPlatStubsPtr->tkUnixContainerId) /* 40 */ +#define TkUnixDoOneXEvent \ + (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */ +#define TkUnixSetMenubar \ + (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */ +#define TkWmCleanup \ + (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */ +#define TkSendCleanup \ + (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ (tkIntPlatStubsPtr->tkpTestsendCmd) /* 45 */ #endif /* X11 */ @@ -779,23 +741,11 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* !END!: Do not edit above this line. */ -#undef TkpCmapStressed_ -#undef TkpSync_ -#undef TkUnixContainerId_ -#undef TkUnixDoOneXEvent_ -#undef TkUnixSetMenubar_ -#undef TkWmCleanup_ -#undef TkSendCleanup_ -#undef TkpTestsendCmd_ -#undef TkGenerateActivateEvents_ -#undef TkMacOSXSetUpClippingRgn -#undef TkMacOSXIsCharacterMissing -#define TkMacOSXIsCharacterMissing(tkfont) ((void)tkfont, 0) +#ifndef TK_NO_DEPRECATED +# define TkMacOSXDrawable Tk_MacOSXGetNSWindowForDrawable +#endif #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkWinGetPlatformId -#define TkWinGetPlatformId() (2) /* VER_PLATFORM_WIN32_NT */ - #endif /* _TKINTPLATDECLS */ diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 360594a..2f56d80 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -498,284 +498,283 @@ EXTERN char * XKeysymToString(KeySym k); EXTERN Colormap XCreateColormap(Display *d, Window w, Visual *v, int i); /* 7 */ -EXTERN GContext XGContextFromGC(GC g); +EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, + XColor *x1, XColor *x2, unsigned int ui1, + unsigned int ui2); /* 8 */ -EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i); +EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, + unsigned int ui1, unsigned int ui2, + XColor _Xconst *x1, XColor _Xconst *x2); /* 9 */ -EXTERN KeySym XStringToKeysym(_Xconst char *c); +EXTERN GContext XGContextFromGC(GC g); /* 10 */ -EXTERN Window XRootWindow(Display *d, int i); +EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b); /* 11 */ -EXTERN XErrorHandler XSetErrorHandler(XErrorHandler x); +EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i); /* 12 */ -EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp); +EXTERN KeySym XStringToKeysym(_Xconst char *c); /* 13 */ -EXTERN int XBell(Display *d, int i); +EXTERN Window XRootWindow(Display *d, int i); /* 14 */ +EXTERN XErrorHandler XSetErrorHandler(XErrorHandler x); +/* 15 */ +EXTERN Status XIconifyWindow(Display *d, Window w, int i); +/* 16 */ +EXTERN Status XWithdrawWindow(Display *d, Window w, int i); +/* 17 */ +EXTERN Status XGetWMColormapWindows(Display *d, Window w, + Window **wpp, int *ip); +/* 18 */ +EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp); +/* 19 */ +EXTERN int XBell(Display *d, int i); +/* 20 */ EXTERN int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); -/* 15 */ +/* 21 */ EXTERN int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); -/* 16 */ +/* 22 */ +EXTERN int XClearWindow(Display *d, Window w); +/* 23 */ EXTERN int XConfigureWindow(Display *d, Window w, unsigned int i, XWindowChanges *x); -/* 17 */ +/* 24 */ EXTERN int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); -/* 18 */ +/* 25 */ EXTERN int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); -/* 19 */ +/* 26 */ EXTERN Pixmap XCreateBitmapFromData(Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); -/* 20 */ +/* 27 */ EXTERN int XDefineCursor(Display *d, Window w, Cursor c); -/* 21 */ +/* 28 */ +EXTERN int XDeleteProperty(Display *d, Window w, Atom a); +/* 29 */ EXTERN int XDestroyWindow(Display *d, Window w); -/* 22 */ +/* 30 */ EXTERN int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); -/* 23 */ +/* 31 */ EXTERN int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); -/* 24 */ +/* 32 */ EXTERN int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); -/* 25 */ +/* 33 */ EXTERN int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); -/* 26 */ +/* 34 */ EXTERN int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); -/* 27 */ +/* 35 */ EXTERN int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i); -/* 28 */ +/* 36 */ +EXTERN int XForceScreenSaver(Display *d, int i); +/* 37 */ EXTERN int XFreeColormap(Display *d, Colormap c); -/* 29 */ +/* 38 */ EXTERN int XFreeColors(Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); -/* 30 */ +/* 39 */ +EXTERN int XFreeCursor(Display *d, Cursor c); +/* 40 */ EXTERN int XFreeModifiermap(XModifierKeymap *x); -/* 31 */ +/* 41 */ EXTERN Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); -/* 32 */ +/* 42 */ +EXTERN int XGetInputFocus(Display *d, Window *w, int *i); +/* 43 */ EXTERN int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); -/* 33 */ +/* 44 */ +EXTERN Status XGetWindowAttributes(Display *d, Window w, + XWindowAttributes *x); +/* 45 */ EXTERN int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t); -/* 34 */ +/* 46 */ EXTERN int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); -/* 35 */ +/* 47 */ EXTERN KeyCode XKeysymToKeycode(Display *d, KeySym k); -/* 36 */ +/* 48 */ +EXTERN Status XLookupColor(Display *d, Colormap c1, + _Xconst char *c2, XColor *x1, XColor *x2); +/* 49 */ EXTERN int XMapWindow(Display *d, Window w); -/* 37 */ +/* 50 */ EXTERN int XMoveResizeWindow(Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); -/* 38 */ +/* 51 */ EXTERN int XMoveWindow(Display *d, Window w, int i1, int i2); -/* 39 */ +/* 52 */ +EXTERN int XNextEvent(Display *d, XEvent *x); +/* 53 */ +EXTERN int XPutBackEvent(Display *d, XEvent *x); +/* 54 */ +EXTERN int XQueryColors(Display *d, Colormap c, XColor *x, + int i); +/* 55 */ EXTERN Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); -/* 40 */ +/* 56 */ +EXTERN Status XQueryTree(Display *d, Window w1, Window *w2, + Window *w3, Window **w4, unsigned int *ui); +/* 57 */ EXTERN int XRaiseWindow(Display *d, Window w); -/* 41 */ +/* 58 */ EXTERN int XRefreshKeyboardMapping(XMappingEvent *x); -/* 42 */ +/* 59 */ EXTERN int XResizeWindow(Display *d, Window w, unsigned int ui1, unsigned int ui2); -/* 43 */ +/* 60 */ EXTERN int XSelectInput(Display *d, Window w, long l); -/* 44 */ +/* 61 */ EXTERN Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x); -/* 45 */ +/* 62 */ +EXTERN int XSetCommand(Display *d, Window w, char **c, int i); +/* 63 */ EXTERN int XSetIconName(Display *d, Window w, _Xconst char *c); -/* 46 */ +/* 64 */ EXTERN int XSetInputFocus(Display *d, Window w, int i, Time t); -/* 47 */ +/* 65 */ EXTERN int XSetSelectionOwner(Display *d, Atom a, Window w, Time t); -/* 48 */ +/* 66 */ EXTERN int XSetWindowBackground(Display *d, Window w, unsigned long ul); -/* 49 */ +/* 67 */ EXTERN int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p); -/* 50 */ +/* 68 */ EXTERN int XSetWindowBorder(Display *d, Window w, unsigned long ul); -/* 51 */ +/* 69 */ EXTERN int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p); -/* 52 */ +/* 70 */ EXTERN int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui); -/* 53 */ +/* 71 */ EXTERN int XSetWindowColormap(Display *d, Window w, Colormap c); -/* 54 */ +/* 72 */ +EXTERN Bool XTranslateCoordinates(Display *d, Window w1, + Window w2, int i1, int i2, int *i3, int *i4, + Window *w3); +/* 73 */ EXTERN int XUngrabKeyboard(Display *d, Time t); -/* 55 */ +/* 74 */ EXTERN int XUngrabPointer(Display *d, Time t); -/* 56 */ +/* 75 */ EXTERN int XUnmapWindow(Display *d, Window w); -/* 57 */ +/* 76 */ +EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x); +/* 77 */ +EXTERN void XDestroyIC(XIC x); +/* 78 */ +EXTERN Bool XFilterEvent(XEvent *x, Window w); +/* 79 */ +EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk, + char *c, int i, KeySym *k, Status *s); +/* 80 */ EXTERN int TkPutImage(unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); -/* 58 */ +/* 81 */ +EXTERN int XSetClipRectangles(Display *display, GC gc, + int clip_x_origin, int clip_y_origin, + XRectangle rectangles[], int n, int ordering); +/* 82 */ EXTERN Status XParseColor(Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); -/* 59 */ +/* 83 */ EXTERN GC XCreateGC(Display *display, Drawable d, unsigned long valuemask, XGCValues *values); -/* 60 */ +/* 84 */ EXTERN int XFreeGC(Display *display, GC gc); -/* 61 */ +/* 85 */ EXTERN Atom XInternAtom(Display *display, _Xconst char *atom_name, Bool only_if_exists); -/* 62 */ +/* 86 */ EXTERN int XSetBackground(Display *display, GC gc, unsigned long foreground); -/* 63 */ +/* 87 */ EXTERN int XSetForeground(Display *display, GC gc, unsigned long foreground); -/* 64 */ +/* 88 */ EXTERN int XSetClipMask(Display *display, GC gc, Pixmap pixmap); -/* 65 */ +/* 89 */ EXTERN int XSetClipOrigin(Display *display, GC gc, int clip_x_origin, int clip_y_origin); -/* 66 */ +/* 90 */ EXTERN int XSetTSOrigin(Display *display, GC gc, int ts_x_origin, int ts_y_origin); -/* 67 */ +/* 91 */ EXTERN int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values); -/* 68 */ +/* 92 */ EXTERN int XSetFont(Display *display, GC gc, Font font); -/* 69 */ +/* 93 */ EXTERN int XSetArcMode(Display *display, GC gc, int arc_mode); -/* 70 */ +/* 94 */ EXTERN int XSetStipple(Display *display, GC gc, Pixmap stipple); -/* 71 */ +/* 95 */ EXTERN int XSetFillRule(Display *display, GC gc, int fill_rule); -/* 72 */ +/* 96 */ EXTERN int XSetFillStyle(Display *display, GC gc, int fill_style); -/* 73 */ +/* 97 */ EXTERN int XSetFunction(Display *display, GC gc, int function); -/* 74 */ +/* 98 */ EXTERN int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); -/* 75 */ +/* 99 */ EXTERN int _XInitImageFuncPtrs(XImage *image); -/* 76 */ +/* 100 */ EXTERN XIC XCreateIC(XIM xim, ...); -/* 77 */ +/* 101 */ EXTERN XVisualInfo * XGetVisualInfo(Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); -/* 78 */ +/* 102 */ EXTERN void XSetWMClientMachine(Display *display, Window w, XTextProperty *text_prop); -/* 79 */ +/* 103 */ EXTERN Status XStringListToTextProperty(char **list, int count, XTextProperty *text_prop_return); -/* 80 */ -EXTERN int XDrawSegments(Display *display, Drawable d, GC gc, - XSegment *segments, int nsegments); -/* 81 */ -EXTERN int XForceScreenSaver(Display *display, int mode); -/* 82 */ +/* 104 */ EXTERN int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); -/* 83 */ +/* 105 */ +EXTERN int XWarpPointer(Display *d, Window s, Window dw, int sx, + int sy, unsigned int sw, unsigned int sh, + int dx, int dy); +/* 106 */ EXTERN int XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); -/* 84 */ -EXTERN int XClearWindow(Display *d, Window w); -/* 85 */ -EXTERN int XDrawPoint(Display *display, Drawable d, GC gc, - int x, int y); -/* 86 */ -EXTERN int XDrawPoints(Display *display, Drawable d, GC gc, - XPoint *points, int npoints, int mode); -/* 87 */ -EXTERN int XWarpPointer(Display *display, Window src_w, - Window dest_w, int src_x, int src_y, - unsigned int src_width, - unsigned int src_height, int dest_x, - int dest_y); -/* 88 */ -EXTERN int XQueryColor(Display *display, Colormap colormap, - XColor *def_in_out); -/* 89 */ -EXTERN int XQueryColors(Display *display, Colormap colormap, - XColor *defs_in_out, int ncolors); -/* 90 */ -EXTERN Status XQueryTree(Display *d, Window w1, Window *w2, - Window *w3, Window **w4, unsigned int *ui); -/* 91 */ -EXTERN int XSync(Display *display, Bool discard); -/* 92 */ -EXTERN Bool XTranslateCoordinates(Display *d, Window w1, - Window w2, int i1, int i2, int *i3, int *i4, - Window *w3); -/* 93 */ -EXTERN int XDeleteProperty(Display *d, Window w, Atom a); -/* 94 */ -EXTERN int XFreeCursor(Display *d, Cursor c); -/* 95 */ -EXTERN int XGetInputFocus(Display *d, Window *w, int *i); -/* 96 */ -EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk, - char *c, int i, KeySym *k, Status *s); -/* 97 */ -EXTERN int XNextEvent(Display *d, XEvent *x); -/* 98 */ -EXTERN int XPutBackEvent(Display *d, XEvent *x); -/* 99 */ -EXTERN int XSetCommand(Display *d, Window w, char **c, int i); -/* 100 */ -EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x); -/* 101 */ -EXTERN Status XGetWindowAttributes(Display *d, Window w, - XWindowAttributes *x); -/* 102 */ -EXTERN Status XGetWMColormapWindows(Display *d, Window w, - Window **wpp, int *ip); -/* 103 */ -EXTERN Status XIconifyWindow(Display *d, Window w, int i); -/* 104 */ -EXTERN Status XWithdrawWindow(Display *d, Window w, int i); -/* 105 */ -EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b); -/* 106 */ -EXTERN int XSetClipRectangles(Display *display, GC gc, - int clip_x_origin, int clip_y_origin, - XRectangle rectangles[], int n, int ordering); /* 107 */ EXTERN int XFlush(Display *display); /* 108 */ @@ -789,8 +788,7 @@ EXTERN int XNoOp(Display *display); /* 112 */ EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff); /* 113 */ -EXTERN Status XLookupColor(Display *d, Colormap c1, - _Xconst char *c2, XColor *x1, XColor *x2); +EXTERN int XSync(Display *display, Bool discard); /* 114 */ EXTERN VisualID XVisualIDFromVisual(Visual *visual); /* Slot 115 is reserved */ @@ -828,9 +826,15 @@ EXTERN int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, /* 132 */ EXTERN int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n); -/* Slot 133 is reserved */ -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ +/* 133 */ +EXTERN int XDrawSegments(Display *d, Drawable dr, GC gc, + XSegment *s, int n); +/* 134 */ +EXTERN int XDrawPoint(Display *d, Drawable dr, GC gc, int x, + int y); +/* 135 */ +EXTERN int XDrawPoints(Display *d, Drawable dr, GC gc, + XPoint *p, int n, int m); /* 136 */ EXTERN int XReparentWindow(Display *d, Window w, Window p, int x, int y); @@ -850,16 +854,9 @@ EXTERN char * XSetICValues(XIC xic, ...); EXTERN char * XGetICValues(XIC xic, ...); /* 143 */ EXTERN void XSetICFocus(XIC xic); -/* 144 */ -EXTERN void XDestroyIC(XIC xic); -/* 145 */ -EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, - XColor *x1, XColor *x2, unsigned int ui1, - unsigned int ui2); -/* 146 */ -EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, - unsigned int ui1, unsigned int ui2, - XColor _Xconst *x1, XColor _Xconst *x2); +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ /* 147 */ EXTERN void XFreeFontSet(Display *display, XFontSet fontset); /* 148 */ @@ -1073,113 +1070,113 @@ typedef struct TkIntXlibStubs { char * (*xGetAtomName) (Display *d, Atom a); /* 4 */ char * (*xKeysymToString) (KeySym k); /* 5 */ Colormap (*xCreateColormap) (Display *d, Window w, Visual *v, int i); /* 6 */ - GContext (*xGContextFromGC) (GC g); /* 7 */ - KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 8 */ - KeySym (*xStringToKeysym) (_Xconst char *c); /* 9 */ - Window (*xRootWindow) (Display *d, int i); /* 10 */ - XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 11 */ - Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 12 */ - int (*xBell) (Display *d, int i); /* 13 */ - int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 14 */ - int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 15 */ - int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 16 */ - int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */ - int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */ - Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 19 */ - int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 20 */ - int (*xDestroyWindow) (Display *d, Window w); /* 21 */ - int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */ - int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 23 */ - int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */ - int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */ - int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */ - int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 27 */ - int (*xFreeColormap) (Display *d, Colormap c); /* 28 */ - int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 29 */ - int (*xFreeModifiermap) (XModifierKeymap *x); /* 30 */ - Status (*xGetGeometry) (Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); /* 31 */ - int (*xGetWindowProperty) (Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); /* 32 */ - int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 33 */ - int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 34 */ - KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 35 */ - int (*xMapWindow) (Display *d, Window w); /* 36 */ - int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */ - int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 38 */ - Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 39 */ - int (*xRaiseWindow) (Display *d, Window w); /* 40 */ - int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */ - int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */ - int (*xSelectInput) (Display *d, Window w, long l); /* 43 */ - Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 44 */ - int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */ - int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */ - int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 47 */ - int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */ - int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */ - int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */ - int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */ - int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */ - int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */ - int (*xUngrabKeyboard) (Display *d, Time t); /* 54 */ - int (*xUngrabPointer) (Display *d, Time t); /* 55 */ - int (*xUnmapWindow) (Display *d, Window w); /* 56 */ - int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 57 */ - Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 58 */ - GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 59 */ - int (*xFreeGC) (Display *display, GC gc); /* 60 */ - Atom (*xInternAtom) (Display *display, _Xconst char *atom_name, Bool only_if_exists); /* 61 */ - int (*xSetBackground) (Display *display, GC gc, unsigned long foreground); /* 62 */ - int (*xSetForeground) (Display *display, GC gc, unsigned long foreground); /* 63 */ - int (*xSetClipMask) (Display *display, GC gc, Pixmap pixmap); /* 64 */ - int (*xSetClipOrigin) (Display *display, GC gc, int clip_x_origin, int clip_y_origin); /* 65 */ - int (*xSetTSOrigin) (Display *display, GC gc, int ts_x_origin, int ts_y_origin); /* 66 */ - int (*xChangeGC) (Display *d, GC gc, unsigned long mask, XGCValues *values); /* 67 */ - int (*xSetFont) (Display *display, GC gc, Font font); /* 68 */ - int (*xSetArcMode) (Display *display, GC gc, int arc_mode); /* 69 */ - int (*xSetStipple) (Display *display, GC gc, Pixmap stipple); /* 70 */ - int (*xSetFillRule) (Display *display, GC gc, int fill_rule); /* 71 */ - int (*xSetFillStyle) (Display *display, GC gc, int fill_style); /* 72 */ - int (*xSetFunction) (Display *display, GC gc, int function); /* 73 */ - int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 74 */ - int (*_XInitImageFuncPtrs) (XImage *image); /* 75 */ - XIC (*xCreateIC) (XIM xim, ...); /* 76 */ - XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 77 */ - void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 78 */ - Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 79 */ - int (*xDrawSegments) (Display *display, Drawable d, GC gc, XSegment *segments, int nsegments); /* 80 */ - int (*xForceScreenSaver) (Display *display, int mode); /* 81 */ - int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 82 */ - int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 83 */ - int (*xClearWindow) (Display *d, Window w); /* 84 */ - int (*xDrawPoint) (Display *display, Drawable d, GC gc, int x, int y); /* 85 */ - int (*xDrawPoints) (Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode); /* 86 */ - int (*xWarpPointer) (Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y); /* 87 */ - int (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */ - int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */ - Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */ - int (*xSync) (Display *display, Bool discard); /* 91 */ - Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 92 */ - int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 93 */ - int (*xFreeCursor) (Display *d, Cursor c); /* 94 */ - int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 95 */ - int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 96 */ - int (*xNextEvent) (Display *d, XEvent *x); /* 97 */ - int (*xPutBackEvent) (Display *d, XEvent *x); /* 98 */ - int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 99 */ - int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 100 */ - Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 101 */ - Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 102 */ - Status (*xIconifyWindow) (Display *d, Window w, int i); /* 103 */ - Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 104 */ - XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 105 */ - int (*xSetClipRectangles) (Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering); /* 106 */ + Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 7 */ + Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 8 */ + GContext (*xGContextFromGC) (GC g); /* 9 */ + XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 10 */ + KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 11 */ + KeySym (*xStringToKeysym) (_Xconst char *c); /* 12 */ + Window (*xRootWindow) (Display *d, int i); /* 13 */ + XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 14 */ + Status (*xIconifyWindow) (Display *d, Window w, int i); /* 15 */ + Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 16 */ + Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 17 */ + Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 18 */ + int (*xBell) (Display *d, int i); /* 19 */ + int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 20 */ + int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 21 */ + int (*xClearWindow) (Display *d, Window w); /* 22 */ + int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 23 */ + int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 24 */ + int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 25 */ + Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 26 */ + int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 27 */ + int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 28 */ + int (*xDestroyWindow) (Display *d, Window w); /* 29 */ + int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 30 */ + int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 31 */ + int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 32 */ + int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 33 */ + int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 34 */ + int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 35 */ + int (*xForceScreenSaver) (Display *d, int i); /* 36 */ + int (*xFreeColormap) (Display *d, Colormap c); /* 37 */ + int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 38 */ + int (*xFreeCursor) (Display *d, Cursor c); /* 39 */ + int (*xFreeModifiermap) (XModifierKeymap *x); /* 40 */ + Status (*xGetGeometry) (Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); /* 41 */ + int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 42 */ + int (*xGetWindowProperty) (Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); /* 43 */ + Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 44 */ + int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 45 */ + int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 46 */ + KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 47 */ + Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 48 */ + int (*xMapWindow) (Display *d, Window w); /* 49 */ + int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 50 */ + int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 51 */ + int (*xNextEvent) (Display *d, XEvent *x); /* 52 */ + int (*xPutBackEvent) (Display *d, XEvent *x); /* 53 */ + int (*xQueryColors) (Display *d, Colormap c, XColor *x, int i); /* 54 */ + Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 55 */ + Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 56 */ + int (*xRaiseWindow) (Display *d, Window w); /* 57 */ + int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 58 */ + int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 59 */ + int (*xSelectInput) (Display *d, Window w, long l); /* 60 */ + Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 61 */ + int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 62 */ + int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 63 */ + int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 64 */ + int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 65 */ + int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 66 */ + int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 67 */ + int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 68 */ + int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 69 */ + int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 70 */ + int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 71 */ + Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 72 */ + int (*xUngrabKeyboard) (Display *d, Time t); /* 73 */ + int (*xUngrabPointer) (Display *d, Time t); /* 74 */ + int (*xUnmapWindow) (Display *d, Window w); /* 75 */ + int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 76 */ + void (*xDestroyIC) (XIC x); /* 77 */ + Bool (*xFilterEvent) (XEvent *x, Window w); /* 78 */ + int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 79 */ + int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 80 */ + int (*xSetClipRectangles) (Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering); /* 81 */ + Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 82 */ + GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 83 */ + int (*xFreeGC) (Display *display, GC gc); /* 84 */ + Atom (*xInternAtom) (Display *display, _Xconst char *atom_name, Bool only_if_exists); /* 85 */ + int (*xSetBackground) (Display *display, GC gc, unsigned long foreground); /* 86 */ + int (*xSetForeground) (Display *display, GC gc, unsigned long foreground); /* 87 */ + int (*xSetClipMask) (Display *display, GC gc, Pixmap pixmap); /* 88 */ + int (*xSetClipOrigin) (Display *display, GC gc, int clip_x_origin, int clip_y_origin); /* 89 */ + int (*xSetTSOrigin) (Display *display, GC gc, int ts_x_origin, int ts_y_origin); /* 90 */ + int (*xChangeGC) (Display *d, GC gc, unsigned long mask, XGCValues *values); /* 91 */ + int (*xSetFont) (Display *display, GC gc, Font font); /* 92 */ + int (*xSetArcMode) (Display *display, GC gc, int arc_mode); /* 93 */ + int (*xSetStipple) (Display *display, GC gc, Pixmap stipple); /* 94 */ + int (*xSetFillRule) (Display *display, GC gc, int fill_rule); /* 95 */ + int (*xSetFillStyle) (Display *display, GC gc, int fill_style); /* 96 */ + int (*xSetFunction) (Display *display, GC gc, int function); /* 97 */ + int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 98 */ + int (*_XInitImageFuncPtrs) (XImage *image); /* 99 */ + XIC (*xCreateIC) (XIM xim, ...); /* 100 */ + XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 101 */ + void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 102 */ + Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 103 */ + int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 104 */ + int (*xWarpPointer) (Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy); /* 105 */ + int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 106 */ int (*xFlush) (Display *display); /* 107 */ int (*xGrabServer) (Display *display); /* 108 */ int (*xUngrabServer) (Display *display); /* 109 */ int (*xFree) (void *data); /* 110 */ int (*xNoOp) (Display *display); /* 111 */ XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */ - Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 113 */ + int (*xSync) (Display *display, Bool discard); /* 113 */ VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */ void (*reserved115)(void); void (*reserved116)(void); @@ -1199,9 +1196,9 @@ typedef struct TkIntXlibStubs { int (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */ int (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */ int (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */ - void (*reserved133)(void); - void (*reserved134)(void); - void (*reserved135)(void); + int (*xDrawSegments) (Display *d, Drawable dr, GC gc, XSegment *s, int n); /* 133 */ + int (*xDrawPoint) (Display *d, Drawable dr, GC gc, int x, int y); /* 134 */ + int (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */ int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */ int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */ Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */ @@ -1210,9 +1207,9 @@ typedef struct TkIntXlibStubs { char * (*xSetICValues) (XIC xic, ...); /* 141 */ char * (*xGetICValues) (XIC xic, ...); /* 142 */ void (*xSetICFocus) (XIC xic); /* 143 */ - void (*xDestroyIC) (XIC xic); /* 144 */ - Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 145 */ - Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 146 */ + void (*reserved144)(void); + void (*reserved145)(void); + void (*reserved146)(void); void (*xFreeFontSet) (Display *display, XFontSet fontset); /* 147 */ int (*xCloseIM) (XIM im); /* 148 */ Bool (*xRegisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 149 */ @@ -1561,206 +1558,206 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xKeysymToString) /* 5 */ #define XCreateColormap \ (tkIntXlibStubsPtr->xCreateColormap) /* 6 */ +#define XCreatePixmapCursor \ + (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 7 */ +#define XCreateGlyphCursor \ + (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 8 */ #define XGContextFromGC \ - (tkIntXlibStubsPtr->xGContextFromGC) /* 7 */ + (tkIntXlibStubsPtr->xGContextFromGC) /* 9 */ +#define XListHosts \ + (tkIntXlibStubsPtr->xListHosts) /* 10 */ #define XKeycodeToKeysym \ - (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 8 */ + (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 11 */ #define XStringToKeysym \ - (tkIntXlibStubsPtr->xStringToKeysym) /* 9 */ + (tkIntXlibStubsPtr->xStringToKeysym) /* 12 */ #define XRootWindow \ - (tkIntXlibStubsPtr->xRootWindow) /* 10 */ + (tkIntXlibStubsPtr->xRootWindow) /* 13 */ #define XSetErrorHandler \ - (tkIntXlibStubsPtr->xSetErrorHandler) /* 11 */ + (tkIntXlibStubsPtr->xSetErrorHandler) /* 14 */ +#define XIconifyWindow \ + (tkIntXlibStubsPtr->xIconifyWindow) /* 15 */ +#define XWithdrawWindow \ + (tkIntXlibStubsPtr->xWithdrawWindow) /* 16 */ +#define XGetWMColormapWindows \ + (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 17 */ #define XAllocColor \ - (tkIntXlibStubsPtr->xAllocColor) /* 12 */ + (tkIntXlibStubsPtr->xAllocColor) /* 18 */ #define XBell \ - (tkIntXlibStubsPtr->xBell) /* 13 */ + (tkIntXlibStubsPtr->xBell) /* 19 */ #define XChangeProperty \ - (tkIntXlibStubsPtr->xChangeProperty) /* 14 */ + (tkIntXlibStubsPtr->xChangeProperty) /* 20 */ #define XChangeWindowAttributes \ - (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 15 */ + (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 21 */ +#define XClearWindow \ + (tkIntXlibStubsPtr->xClearWindow) /* 22 */ #define XConfigureWindow \ - (tkIntXlibStubsPtr->xConfigureWindow) /* 16 */ + (tkIntXlibStubsPtr->xConfigureWindow) /* 23 */ #define XCopyArea \ - (tkIntXlibStubsPtr->xCopyArea) /* 17 */ + (tkIntXlibStubsPtr->xCopyArea) /* 24 */ #define XCopyPlane \ - (tkIntXlibStubsPtr->xCopyPlane) /* 18 */ + (tkIntXlibStubsPtr->xCopyPlane) /* 25 */ #define XCreateBitmapFromData \ - (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 19 */ + (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 26 */ #define XDefineCursor \ - (tkIntXlibStubsPtr->xDefineCursor) /* 20 */ + (tkIntXlibStubsPtr->xDefineCursor) /* 27 */ +#define XDeleteProperty \ + (tkIntXlibStubsPtr->xDeleteProperty) /* 28 */ #define XDestroyWindow \ - (tkIntXlibStubsPtr->xDestroyWindow) /* 21 */ + (tkIntXlibStubsPtr->xDestroyWindow) /* 29 */ #define XDrawArc \ - (tkIntXlibStubsPtr->xDrawArc) /* 22 */ + (tkIntXlibStubsPtr->xDrawArc) /* 30 */ #define XDrawLines \ - (tkIntXlibStubsPtr->xDrawLines) /* 23 */ + (tkIntXlibStubsPtr->xDrawLines) /* 31 */ #define XDrawRectangle \ - (tkIntXlibStubsPtr->xDrawRectangle) /* 24 */ + (tkIntXlibStubsPtr->xDrawRectangle) /* 32 */ #define XFillArc \ - (tkIntXlibStubsPtr->xFillArc) /* 25 */ + (tkIntXlibStubsPtr->xFillArc) /* 33 */ #define XFillPolygon \ - (tkIntXlibStubsPtr->xFillPolygon) /* 26 */ + (tkIntXlibStubsPtr->xFillPolygon) /* 34 */ #define XFillRectangles \ - (tkIntXlibStubsPtr->xFillRectangles) /* 27 */ + (tkIntXlibStubsPtr->xFillRectangles) /* 35 */ +#define XForceScreenSaver \ + (tkIntXlibStubsPtr->xForceScreenSaver) /* 36 */ #define XFreeColormap \ - (tkIntXlibStubsPtr->xFreeColormap) /* 28 */ + (tkIntXlibStubsPtr->xFreeColormap) /* 37 */ #define XFreeColors \ - (tkIntXlibStubsPtr->xFreeColors) /* 29 */ + (tkIntXlibStubsPtr->xFreeColors) /* 38 */ +#define XFreeCursor \ + (tkIntXlibStubsPtr->xFreeCursor) /* 39 */ #define XFreeModifiermap \ - (tkIntXlibStubsPtr->xFreeModifiermap) /* 30 */ + (tkIntXlibStubsPtr->xFreeModifiermap) /* 40 */ #define XGetGeometry \ - (tkIntXlibStubsPtr->xGetGeometry) /* 31 */ + (tkIntXlibStubsPtr->xGetGeometry) /* 41 */ +#define XGetInputFocus \ + (tkIntXlibStubsPtr->xGetInputFocus) /* 42 */ #define XGetWindowProperty \ - (tkIntXlibStubsPtr->xGetWindowProperty) /* 32 */ + (tkIntXlibStubsPtr->xGetWindowProperty) /* 43 */ +#define XGetWindowAttributes \ + (tkIntXlibStubsPtr->xGetWindowAttributes) /* 44 */ #define XGrabKeyboard \ - (tkIntXlibStubsPtr->xGrabKeyboard) /* 33 */ + (tkIntXlibStubsPtr->xGrabKeyboard) /* 45 */ #define XGrabPointer \ - (tkIntXlibStubsPtr->xGrabPointer) /* 34 */ + (tkIntXlibStubsPtr->xGrabPointer) /* 46 */ #define XKeysymToKeycode \ - (tkIntXlibStubsPtr->xKeysymToKeycode) /* 35 */ + (tkIntXlibStubsPtr->xKeysymToKeycode) /* 47 */ +#define XLookupColor \ + (tkIntXlibStubsPtr->xLookupColor) /* 48 */ #define XMapWindow \ - (tkIntXlibStubsPtr->xMapWindow) /* 36 */ + (tkIntXlibStubsPtr->xMapWindow) /* 49 */ #define XMoveResizeWindow \ - (tkIntXlibStubsPtr->xMoveResizeWindow) /* 37 */ + (tkIntXlibStubsPtr->xMoveResizeWindow) /* 50 */ #define XMoveWindow \ - (tkIntXlibStubsPtr->xMoveWindow) /* 38 */ + (tkIntXlibStubsPtr->xMoveWindow) /* 51 */ +#define XNextEvent \ + (tkIntXlibStubsPtr->xNextEvent) /* 52 */ +#define XPutBackEvent \ + (tkIntXlibStubsPtr->xPutBackEvent) /* 53 */ +#define XQueryColors \ + (tkIntXlibStubsPtr->xQueryColors) /* 54 */ #define XQueryPointer \ - (tkIntXlibStubsPtr->xQueryPointer) /* 39 */ + (tkIntXlibStubsPtr->xQueryPointer) /* 55 */ +#define XQueryTree \ + (tkIntXlibStubsPtr->xQueryTree) /* 56 */ #define XRaiseWindow \ - (tkIntXlibStubsPtr->xRaiseWindow) /* 40 */ + (tkIntXlibStubsPtr->xRaiseWindow) /* 57 */ #define XRefreshKeyboardMapping \ - (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 41 */ + (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 58 */ #define XResizeWindow \ - (tkIntXlibStubsPtr->xResizeWindow) /* 42 */ + (tkIntXlibStubsPtr->xResizeWindow) /* 59 */ #define XSelectInput \ - (tkIntXlibStubsPtr->xSelectInput) /* 43 */ + (tkIntXlibStubsPtr->xSelectInput) /* 60 */ #define XSendEvent \ - (tkIntXlibStubsPtr->xSendEvent) /* 44 */ + (tkIntXlibStubsPtr->xSendEvent) /* 61 */ +#define XSetCommand \ + (tkIntXlibStubsPtr->xSetCommand) /* 62 */ #define XSetIconName \ - (tkIntXlibStubsPtr->xSetIconName) /* 45 */ + (tkIntXlibStubsPtr->xSetIconName) /* 63 */ #define XSetInputFocus \ - (tkIntXlibStubsPtr->xSetInputFocus) /* 46 */ + (tkIntXlibStubsPtr->xSetInputFocus) /* 64 */ #define XSetSelectionOwner \ - (tkIntXlibStubsPtr->xSetSelectionOwner) /* 47 */ + (tkIntXlibStubsPtr->xSetSelectionOwner) /* 65 */ #define XSetWindowBackground \ - (tkIntXlibStubsPtr->xSetWindowBackground) /* 48 */ + (tkIntXlibStubsPtr->xSetWindowBackground) /* 66 */ #define XSetWindowBackgroundPixmap \ - (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 49 */ + (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 67 */ #define XSetWindowBorder \ - (tkIntXlibStubsPtr->xSetWindowBorder) /* 50 */ + (tkIntXlibStubsPtr->xSetWindowBorder) /* 68 */ #define XSetWindowBorderPixmap \ - (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 51 */ + (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 69 */ #define XSetWindowBorderWidth \ - (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 52 */ + (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 70 */ #define XSetWindowColormap \ - (tkIntXlibStubsPtr->xSetWindowColormap) /* 53 */ + (tkIntXlibStubsPtr->xSetWindowColormap) /* 71 */ +#define XTranslateCoordinates \ + (tkIntXlibStubsPtr->xTranslateCoordinates) /* 72 */ #define XUngrabKeyboard \ - (tkIntXlibStubsPtr->xUngrabKeyboard) /* 54 */ + (tkIntXlibStubsPtr->xUngrabKeyboard) /* 73 */ #define XUngrabPointer \ - (tkIntXlibStubsPtr->xUngrabPointer) /* 55 */ + (tkIntXlibStubsPtr->xUngrabPointer) /* 74 */ #define XUnmapWindow \ - (tkIntXlibStubsPtr->xUnmapWindow) /* 56 */ + (tkIntXlibStubsPtr->xUnmapWindow) /* 75 */ +#define XWindowEvent \ + (tkIntXlibStubsPtr->xWindowEvent) /* 76 */ +#define XDestroyIC \ + (tkIntXlibStubsPtr->xDestroyIC) /* 77 */ +#define XFilterEvent \ + (tkIntXlibStubsPtr->xFilterEvent) /* 78 */ +#define XmbLookupString \ + (tkIntXlibStubsPtr->xmbLookupString) /* 79 */ #define TkPutImage \ - (tkIntXlibStubsPtr->tkPutImage) /* 57 */ + (tkIntXlibStubsPtr->tkPutImage) /* 80 */ +#define XSetClipRectangles \ + (tkIntXlibStubsPtr->xSetClipRectangles) /* 81 */ #define XParseColor \ - (tkIntXlibStubsPtr->xParseColor) /* 58 */ + (tkIntXlibStubsPtr->xParseColor) /* 82 */ #define XCreateGC \ - (tkIntXlibStubsPtr->xCreateGC) /* 59 */ + (tkIntXlibStubsPtr->xCreateGC) /* 83 */ #define XFreeGC \ - (tkIntXlibStubsPtr->xFreeGC) /* 60 */ + (tkIntXlibStubsPtr->xFreeGC) /* 84 */ #define XInternAtom \ - (tkIntXlibStubsPtr->xInternAtom) /* 61 */ + (tkIntXlibStubsPtr->xInternAtom) /* 85 */ #define XSetBackground \ - (tkIntXlibStubsPtr->xSetBackground) /* 62 */ + (tkIntXlibStubsPtr->xSetBackground) /* 86 */ #define XSetForeground \ - (tkIntXlibStubsPtr->xSetForeground) /* 63 */ + (tkIntXlibStubsPtr->xSetForeground) /* 87 */ #define XSetClipMask \ - (tkIntXlibStubsPtr->xSetClipMask) /* 64 */ + (tkIntXlibStubsPtr->xSetClipMask) /* 88 */ #define XSetClipOrigin \ - (tkIntXlibStubsPtr->xSetClipOrigin) /* 65 */ + (tkIntXlibStubsPtr->xSetClipOrigin) /* 89 */ #define XSetTSOrigin \ - (tkIntXlibStubsPtr->xSetTSOrigin) /* 66 */ + (tkIntXlibStubsPtr->xSetTSOrigin) /* 90 */ #define XChangeGC \ - (tkIntXlibStubsPtr->xChangeGC) /* 67 */ + (tkIntXlibStubsPtr->xChangeGC) /* 91 */ #define XSetFont \ - (tkIntXlibStubsPtr->xSetFont) /* 68 */ + (tkIntXlibStubsPtr->xSetFont) /* 92 */ #define XSetArcMode \ - (tkIntXlibStubsPtr->xSetArcMode) /* 69 */ + (tkIntXlibStubsPtr->xSetArcMode) /* 93 */ #define XSetStipple \ - (tkIntXlibStubsPtr->xSetStipple) /* 70 */ + (tkIntXlibStubsPtr->xSetStipple) /* 94 */ #define XSetFillRule \ - (tkIntXlibStubsPtr->xSetFillRule) /* 71 */ + (tkIntXlibStubsPtr->xSetFillRule) /* 95 */ #define XSetFillStyle \ - (tkIntXlibStubsPtr->xSetFillStyle) /* 72 */ + (tkIntXlibStubsPtr->xSetFillStyle) /* 96 */ #define XSetFunction \ - (tkIntXlibStubsPtr->xSetFunction) /* 73 */ + (tkIntXlibStubsPtr->xSetFunction) /* 97 */ #define XSetLineAttributes \ - (tkIntXlibStubsPtr->xSetLineAttributes) /* 74 */ + (tkIntXlibStubsPtr->xSetLineAttributes) /* 98 */ #define _XInitImageFuncPtrs \ - (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 75 */ + (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 99 */ #define XCreateIC \ - (tkIntXlibStubsPtr->xCreateIC) /* 76 */ + (tkIntXlibStubsPtr->xCreateIC) /* 100 */ #define XGetVisualInfo \ - (tkIntXlibStubsPtr->xGetVisualInfo) /* 77 */ + (tkIntXlibStubsPtr->xGetVisualInfo) /* 101 */ #define XSetWMClientMachine \ - (tkIntXlibStubsPtr->xSetWMClientMachine) /* 78 */ + (tkIntXlibStubsPtr->xSetWMClientMachine) /* 102 */ #define XStringListToTextProperty \ - (tkIntXlibStubsPtr->xStringListToTextProperty) /* 79 */ -#define XDrawSegments \ - (tkIntXlibStubsPtr->xDrawSegments) /* 80 */ -#define XForceScreenSaver \ - (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */ + (tkIntXlibStubsPtr->xStringListToTextProperty) /* 103 */ #define XDrawLine \ - (tkIntXlibStubsPtr->xDrawLine) /* 82 */ -#define XFillRectangle \ - (tkIntXlibStubsPtr->xFillRectangle) /* 83 */ -#define XClearWindow \ - (tkIntXlibStubsPtr->xClearWindow) /* 84 */ -#define XDrawPoint \ - (tkIntXlibStubsPtr->xDrawPoint) /* 85 */ -#define XDrawPoints \ - (tkIntXlibStubsPtr->xDrawPoints) /* 86 */ + (tkIntXlibStubsPtr->xDrawLine) /* 104 */ #define XWarpPointer \ - (tkIntXlibStubsPtr->xWarpPointer) /* 87 */ -#define XQueryColor \ - (tkIntXlibStubsPtr->xQueryColor) /* 88 */ -#define XQueryColors \ - (tkIntXlibStubsPtr->xQueryColors) /* 89 */ -#define XQueryTree \ - (tkIntXlibStubsPtr->xQueryTree) /* 90 */ -#define XSync \ - (tkIntXlibStubsPtr->xSync) /* 91 */ -#define XTranslateCoordinates \ - (tkIntXlibStubsPtr->xTranslateCoordinates) /* 92 */ -#define XDeleteProperty \ - (tkIntXlibStubsPtr->xDeleteProperty) /* 93 */ -#define XFreeCursor \ - (tkIntXlibStubsPtr->xFreeCursor) /* 94 */ -#define XGetInputFocus \ - (tkIntXlibStubsPtr->xGetInputFocus) /* 95 */ -#define XmbLookupString \ - (tkIntXlibStubsPtr->xmbLookupString) /* 96 */ -#define XNextEvent \ - (tkIntXlibStubsPtr->xNextEvent) /* 97 */ -#define XPutBackEvent \ - (tkIntXlibStubsPtr->xPutBackEvent) /* 98 */ -#define XSetCommand \ - (tkIntXlibStubsPtr->xSetCommand) /* 99 */ -#define XWindowEvent \ - (tkIntXlibStubsPtr->xWindowEvent) /* 100 */ -#define XGetWindowAttributes \ - (tkIntXlibStubsPtr->xGetWindowAttributes) /* 101 */ -#define XGetWMColormapWindows \ - (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 102 */ -#define XIconifyWindow \ - (tkIntXlibStubsPtr->xIconifyWindow) /* 103 */ -#define XWithdrawWindow \ - (tkIntXlibStubsPtr->xWithdrawWindow) /* 104 */ -#define XListHosts \ - (tkIntXlibStubsPtr->xListHosts) /* 105 */ -#define XSetClipRectangles \ - (tkIntXlibStubsPtr->xSetClipRectangles) /* 106 */ + (tkIntXlibStubsPtr->xWarpPointer) /* 105 */ +#define XFillRectangle \ + (tkIntXlibStubsPtr->xFillRectangle) /* 106 */ #define XFlush \ (tkIntXlibStubsPtr->xFlush) /* 107 */ #define XGrabServer \ @@ -1773,8 +1770,8 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xNoOp) /* 111 */ #define XSynchronize \ (tkIntXlibStubsPtr->xSynchronize) /* 112 */ -#define XLookupColor \ - (tkIntXlibStubsPtr->xLookupColor) /* 113 */ +#define XSync \ + (tkIntXlibStubsPtr->xSync) /* 113 */ #define XVisualIDFromVisual \ (tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */ /* Slot 115 is reserved */ @@ -1802,9 +1799,12 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xDrawArcs) /* 131 */ #define XDrawRectangles \ (tkIntXlibStubsPtr->xDrawRectangles) /* 132 */ -/* Slot 133 is reserved */ -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ +#define XDrawSegments \ + (tkIntXlibStubsPtr->xDrawSegments) /* 133 */ +#define XDrawPoint \ + (tkIntXlibStubsPtr->xDrawPoint) /* 134 */ +#define XDrawPoints \ + (tkIntXlibStubsPtr->xDrawPoints) /* 135 */ #define XReparentWindow \ (tkIntXlibStubsPtr->xReparentWindow) /* 136 */ #define XPutImage \ @@ -1821,12 +1821,9 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xGetICValues) /* 142 */ #define XSetICFocus \ (tkIntXlibStubsPtr->xSetICFocus) /* 143 */ -#define XDestroyIC \ - (tkIntXlibStubsPtr->xDestroyIC) /* 144 */ -#define XCreatePixmapCursor \ - (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 145 */ -#define XCreateGlyphCursor \ - (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 146 */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ #define XFreeFontSet \ (tkIntXlibStubsPtr->xFreeFontSet) /* 147 */ #define XCloseIM \ diff --git a/generic/tkMain.c b/generic/tkMain.c index 949afca..c41715b 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -187,7 +187,7 @@ Tk_MainEx( * Ensure that we are getting a compatible version of Tcl. */ - if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) { if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { abort(); } else { @@ -247,9 +247,6 @@ Tk_MainEx( */ if (NULL == Tcl_GetStartupScript(NULL)) { -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - size_t length; -#endif /* * Check whether first 3 args (argv[1] - argv[3]) look like @@ -273,14 +270,6 @@ Tk_MainEx( Tcl_SetStartupScript(NewNativeObj(argv[1]), NULL); argc--; i++; -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - } else if ((argc >= 2) && (length = _tcslen(argv[1])) - && (length > 1) && (0 == _tcsncmp(TEXT("-file"), argv[1], length)) - && ('-' != argv[2][0])) { - Tcl_SetStartupScript(NewNativeObj(argv[2]), NULL); - argc -= 2; - i += 2; -#endif } } diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 04c49aa..34a6d78 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -855,12 +855,11 @@ MenuWidgetObjCmd( if (GetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) { goto error; } -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) if (index < 0) { Tcl_SetObjResult(interp, Tcl_NewObj()); - } else -#endif - Tcl_SetObjResult(interp, TkNewIndexObj(index)); + } else { + Tcl_SetObjResult(interp, TkNewIndexObj(index)); + } break; } case MENU_INSERT: @@ -2185,12 +2184,6 @@ GetMenuIndex( *indexPtr = TCL_INDEX_NONE; return TCL_OK; } -#if !defined(TK_NO_DEPRECATED) && TK_MAJOR_VERSION < 9 - if ((string[0] == 'n') && (strcmp(string, "none") == 0)) { - *indexPtr = TCL_INDEX_NONE; - return TCL_OK; - } -#endif if (string[0] == '@') { if (GetIndexFromCoords(interp, menuPtr, string, indexPtr) diff --git a/generic/tkObj.c b/generic/tkObj.c index 8978886..68f4acd 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -96,35 +96,6 @@ static int SetMMFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int SetPixelFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int SetWindowFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); -#if TCL_MAJOR_VERSION < 9 -#ifdef __cplusplus -extern "C" { -#endif -#if defined(USE_TCL_STUBS) -/* Little hack to eliminate the need for "tclInt.h" here: - Just copy a small portion of TclIntStubs, just - enough to make it work */ -typedef struct TclIntStubs { - int magic; - void *hooks; - void (*dummy[34]) (void); /* dummy entries 0-33, not used */ - int (*tclGetIntForIndex) (Tcl_Interp *interp, Tcl_Obj *objPtr, int endValue, int *indexPtr); /* 34 */ -} TclIntStubs; -extern const TclIntStubs *tclIntStubsPtr; - -# undef Tcl_GetIntForIndex -# define Tcl_GetIntForIndex(interp, obj, max, ptr) ((tclIntStubsPtr->tclGetIntForIndex == NULL)? \ - ((int (*)(Tcl_Interp*, Tcl_Obj *, int, int*))(void *)((&(tclStubsPtr->tcl_PkgProvideEx))[645]))((interp), (obj), (max), (ptr)): \ - tclIntStubsPtr->tclGetIntForIndex((interp), (obj), (max), (ptr))) -#elif TCL_MINOR_VERSION < 7 -extern int TclGetIntForIndex(Tcl_Interp*, Tcl_Obj *, int, int*); -# define Tcl_GetIntForIndex(interp, obj, max, ptr) TclGetIntForIndex(interp, obj, max, ptr) -#endif -#ifdef __cplusplus -} -#endif -#endif - /* * The following structure defines the implementation of the "pixel" Tcl * object, used for measuring distances. The pixel object remembers its diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index a25861d..7e902db 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -61,7 +61,7 @@ static void DeleteSpecCacheTable(void *clientData, * will hold an error message. * * Side effects: - * The fields of widgRec get filled in with information from argc/argv + * The fields of widgRec get filled in with information from objc/objv * and the option database. Old information in widgRec's fields gets * recycled. A copy of the spec-table is taken with (some of) the char* * fields converted into Tk_Uid fields; this copy will be released when @@ -76,8 +76,8 @@ Tk_ConfigureWidget( Tk_Window tkwin, /* Window containing widget (needed to set up * X resources). */ const Tk_ConfigSpec *specs, /* Describes legal options. */ - Tcl_Size argc, /* Number of elements in argv. */ - const char **argv, /* Command-line options. */ + Tcl_Size objc, /* Number of elements in objv. */ + Tcl_Obj *const *objv, /* Command-line options. */ void *widgRec, /* Record whose fields are to be modified. * Values must be properly initialized. */ int flags) /* Used to specify additional flags that must @@ -125,18 +125,10 @@ Tk_ConfigureWidget( * match entries in the specs. */ - for ( ; argc > 0; argc -= 2, argv += 2) { + for ( ; objc > 0; objc -= 2, objv += 2) { const char *arg; - if (flags & TK_CONFIG_OBJS) { - arg = Tcl_GetString((Tcl_Obj *) *argv); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - arg = *argv; -#endif - } + arg = Tcl_GetString(*objv); specPtr = FindConfigSpec(interp, staticSpecs, arg, needFlags, hateFlags); if (specPtr == NULL) { return TCL_ERROR; @@ -146,21 +138,13 @@ Tk_ConfigureWidget( * Process the entry. */ - if (argc < 2) { + if (objc < 2) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", arg)); Tcl_SetErrorCode(interp, "TK", "VALUE_MISSING", NULL); return TCL_ERROR; } - if (flags & TK_CONFIG_OBJS) { - arg = Tcl_GetString((Tcl_Obj *) argv[1]); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - arg = argv[1]; -#endif - } + arg = Tcl_GetString(objv[1]); if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (processing \"%.40s\" option)",specPtr->argvName)); diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c deleted file mode 100644 index d135958..0000000 --- a/generic/tkOldTest.c +++ /dev/null @@ -1,418 +0,0 @@ -/* - * tkOldTest.c -- - * - * This file contains C command functions for additional Tcl - * commands that are used to test Tk's support for legacy - * interfaces. These commands are not normally included in Tcl/Tk - * applications; they're only used for testing. - * - * Copyright © 1993-1994 The Regents of the University of California. - * Copyright © 1994-1997 Sun Microsystems, Inc. - * Copyright © 1998-1999 Scriptics Corporation. - * Contributions by Don Porter, NIST, 2007. (not subject to US copyright) - * - * See the file "license.terms" for information on usage and redistribution of - * this file, and for a DISCLAIMER OF ALL WARRANTIES. - */ - -#define USE_OLD_IMAGE -#ifndef USE_TCL_STUBS -# define USE_TCL_STUBS -#endif -#ifndef USE_TK_STUBS -# define USE_TK_STUBS -#endif -#include "tkInt.h" - -#ifdef _WIN32 -#include "tkWinInt.h" -#endif - -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -/* - * The following data structure represents the model for a test image: - */ - -typedef struct TImageModel { - Tk_ImageModel model; /* Tk's token for image model. */ - Tcl_Interp *interp; /* Interpreter for application. */ - int width, height; /* Dimensions of image. */ - char *imageName; /* Name of image (malloc-ed). */ - char *varName; /* Name of variable in which to log events for - * image (malloc-ed). */ -} TImageModel; - -/* - * The following data structure represents a particular use of a particular - * test image. - */ - -typedef struct TImageInstance { - TImageModel *modelPtr; /* Pointer to model for image. */ - XColor *fg; /* Foreground color for drawing in image. */ - GC gc; /* Graphics context for drawing in image. */ -} TImageInstance; - -/* - * The type record for test images: - */ - -static int ImageCreate(Tcl_Interp *interp, - char *name, Tcl_Size argc, char **argv, - Tk_ImageType *typePtr, Tk_ImageModel model, - ClientData *clientDataPtr); -static ClientData ImageGet(Tk_Window tkwin, ClientData clientData); -static void ImageDisplay(ClientData clientData, - Display *display, Drawable drawable, - int imageX, int imageY, int width, - int height, int drawableX, - int drawableY); -static void ImageFree(ClientData clientData, Display *display); -static void ImageDelete(ClientData clientData); - -static Tk_ImageType imageType = { - "oldtest", /* name */ - (Tk_ImageCreateProc *) ImageCreate, /* createProc */ - ImageGet, /* getProc */ - ImageDisplay, /* displayProc */ - ImageFree, /* freeProc */ - ImageDelete, /* deleteProc */ - NULL, /* postscriptPtr */ - NULL, /* nextPtr */ - NULL -}; - -/* - * Forward declarations for functions defined later in this file: - */ - -static int ImageObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -#endif - -/* - *---------------------------------------------------------------------- - * - * TkOldTestInit -- - * - * This function performs initialization for the Tk test suite - * extensions for testing support for legacy interfaces. - * - * Results: - * Returns a standard Tcl completion code, and leaves an error message in - * the interp's result if an error occurs. - * - * Side effects: - * Creates several test commands. - * - *---------------------------------------------------------------------- - */ - -int -TkOldTestInit( - Tcl_Interp *dummy) -{ - static int initialized = 0; - (void)dummy; - - if (!initialized) { - initialized = 1; -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) - Tk_CreateImageType(&imageType); -#endif - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * ImageCreate -- - * - * This function is called by the Tk image code to create "oldtest" images. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * The data structure for a new image is allocated. - * - *---------------------------------------------------------------------- - */ -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -static int -ImageCreate( - Tcl_Interp *interp, /* Interpreter for application containing - * image. */ - char *name, /* Name to use for image. */ - Tcl_Size argc, /* Number of arguments. */ - char **argv, /* Argument strings for options (doesn't - * include image name or type). */ - Tk_ImageType *typePtr, /* Pointer to our type record (not used). */ - Tk_ImageModel model, /* Token for image, to be used by us in later - * callbacks. */ - ClientData *clientDataPtr) /* Store manager's token for image here; it - * will be returned in later callbacks. */ -{ - TImageModel *timPtr; - const char *varName; - Tcl_Size i; - (void)typePtr; - - varName = "log"; - for (i = 0; i < argc; i += 2) { - if (strcmp(argv[i], "-variable") != 0) { - Tcl_AppendResult(interp, "bad option name \"", - argv[i], "\"", NULL); - return TCL_ERROR; - } - if ((i+1) == argc) { - Tcl_AppendResult(interp, "no value given for \"", - argv[i], "\" option", NULL); - return TCL_ERROR; - } - varName = argv[i+1]; - } - - timPtr = (TImageModel *)ckalloc(sizeof(TImageModel)); - timPtr->model = model; - timPtr->interp = interp; - timPtr->width = 30; - timPtr->height = 15; - timPtr->imageName = (char *)ckalloc(strlen(name) + 1); - strcpy(timPtr->imageName, name); - timPtr->varName = (char *)ckalloc(strlen(varName) + 1); - strcpy(timPtr->varName, varName); - Tcl_CreateObjCommand(interp, name, ImageObjCmd, timPtr, NULL); - *clientDataPtr = timPtr; - Tk_ImageChanged(model, 0, 0, 30, 15, 30, 15); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * ImageObjCmd -- - * - * This function implements the commands corresponding to individual - * images. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * Forces windows to be created. - * - *---------------------------------------------------------------------- - */ - -static int -ImageObjCmd( - ClientData clientData, /* Main window for application. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument strings. */ -{ - TImageModel *timPtr = (TImageModel *)clientData; - int x, y, width, height; - - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); - return TCL_ERROR; - } - if (strcmp(Tcl_GetString(objv[1]), "changed") == 0) { - if (objc != 8) { - Tcl_WrongNumArgs(interp, 1, objv, "changed x y width height" - " imageWidth imageHeight"); - return TCL_ERROR; - } - if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[4], &width) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[5], &height) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[6], &timPtr->width) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[7], &timPtr->height) != TCL_OK)) { - return TCL_ERROR; - } - Tk_ImageChanged(timPtr->model, x, y, width, height, timPtr->width, - timPtr->height); - } else { - Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]), - "\": must be changed", NULL); - return TCL_ERROR; - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * ImageGet -- - * - * This function is called by Tk to set things up for using a test image - * in a particular widget. - * - * Results: - * The return value is a token for the image instance, which is used in - * future callbacks to ImageDisplay and ImageFree. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static ClientData -ImageGet( - Tk_Window tkwin, /* Token for window in which image will be - * used. */ - ClientData clientData) /* Pointer to TImageModel for image. */ -{ - TImageModel *timPtr = (TImageModel *)clientData; - TImageInstance *instPtr; - char buffer[100]; - XGCValues gcValues; - - snprintf(buffer, sizeof(buffer), "%s get", timPtr->imageName); - Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer, - TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - - instPtr = (TImageInstance *)ckalloc(sizeof(TImageInstance)); - instPtr->modelPtr = timPtr; - instPtr->fg = Tk_GetColor(timPtr->interp, tkwin, "#ff0000"); - gcValues.foreground = instPtr->fg->pixel; - instPtr->gc = Tk_GetGC(tkwin, GCForeground, &gcValues); - return instPtr; -} - -/* - *---------------------------------------------------------------------- - * - * ImageDisplay -- - * - * This function is invoked to redisplay part or all of an image in a - * given drawable. - * - * Results: - * None. - * - * Side effects: - * The image gets partially redrawn, as an "X" that shows the exact - * redraw area. - * - *---------------------------------------------------------------------- - */ - -static void -ImageDisplay( - ClientData clientData, /* Pointer to TImageInstance for image. */ - Display *display, /* Display to use for drawing. */ - Drawable drawable, /* Where to redraw image. */ - int imageX, int imageY, /* Origin of area to redraw, relative to - * origin of image. */ - int width, int height, /* Dimensions of area to redraw. */ - int drawableX, int drawableY) - /* Coordinates in drawable corresponding to - * imageX and imageY. */ -{ - TImageInstance *instPtr = (TImageInstance *)clientData; - char buffer[200 + TCL_INTEGER_SPACE * 6]; - - snprintf(buffer, sizeof(buffer), "%s display %d %d %d %d %d %d", - instPtr->modelPtr->imageName, imageX, imageY, width, height, - drawableX, drawableY); - Tcl_SetVar2(instPtr->modelPtr->interp, instPtr->modelPtr->varName, NULL, - buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - if (width > (instPtr->modelPtr->width - imageX)) { - width = instPtr->modelPtr->width - imageX; - } - if (height > (instPtr->modelPtr->height - imageY)) { - height = instPtr->modelPtr->height - imageY; - } - XDrawRectangle(display, drawable, instPtr->gc, drawableX, drawableY, - (unsigned) (width-1), (unsigned) (height-1)); - XDrawLine(display, drawable, instPtr->gc, drawableX, drawableY, - (int) (drawableX + width - 1), (int) (drawableY + height - 1)); - XDrawLine(display, drawable, instPtr->gc, drawableX, - (int) (drawableY + height - 1), - (int) (drawableX + width - 1), drawableY); -} - -/* - *---------------------------------------------------------------------- - * - * ImageFree -- - * - * This function is called when an instance of an image is no longer - * used. - * - * Results: - * None. - * - * Side effects: - * Information related to the instance is freed. - * - *---------------------------------------------------------------------- - */ - -static void -ImageFree( - ClientData clientData, /* Pointer to TImageInstance for instance. */ - Display *display) /* Display where image was to be drawn. */ -{ - TImageInstance *instPtr = (TImageInstance *)clientData; - char buffer[200]; - - snprintf(buffer, sizeof(buffer), "%s free", instPtr->modelPtr->imageName); - Tcl_SetVar2(instPtr->modelPtr->interp, instPtr->modelPtr->varName, NULL, - buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - Tk_FreeColor(instPtr->fg); - Tk_FreeGC(display, instPtr->gc); - ckfree(instPtr); -} - -/* - *---------------------------------------------------------------------- - * - * ImageDelete -- - * - * This function is called to clean up a test image when an application - * goes away. - * - * Results: - * None. - * - * Side effects: - * Information about the image is deleted. - * - *---------------------------------------------------------------------- - */ - -static void -ImageDelete( - ClientData clientData) /* Pointer to TImageModel for image. When - * this function is called, no more instances - * exist. */ -{ - TImageModel *timPtr = (TImageModel *)clientData; - char buffer[100]; - - snprintf(buffer, sizeof(buffer), "%s delete", timPtr->imageName); - Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer, - TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - - Tcl_DeleteCommand(timPtr->interp, timPtr->imageName); - ckfree(timPtr->imageName); - ckfree(timPtr->varName); - ckfree(timPtr); -} -#endif - -/* - * Local Variables: - * mode: c - * c-basic-offset: 4 - * fill-column: 78 - * End: - */ diff --git a/generic/tkPack.c b/generic/tkPack.c index 8dc6284..baf2a70 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -122,10 +122,6 @@ static int ConfigureContent(Tcl_Interp *interp, Tk_Window tkwin, int objc, Tcl_Obj *const objv[]); static Tcl_FreeProc DestroyPacker; static Packer * GetPacker(Tk_Window tkwin); -#ifndef TK_NO_DEPRECATED -static int PackAfter(Tcl_Interp *interp, Packer *prevPtr, - Packer *containerPtr, int objc,Tcl_Obj *const objv[]); -#endif /* !TK_NO_DEPRECATED */ static void PackStructureProc(void *clientData, XEvent *eventPtr); static void Unlink(Packer *packPtr); @@ -199,16 +195,10 @@ Tk_PackObjCmd( Tk_Window tkwin = (Tk_Window)clientData; const char *argv2; static const char *const optionStrings[] = { -#ifndef TK_NO_DEPRECATED - "after", "append", "before", "unpack", -#endif /* !TK_NO_DEPRECATED */ "configure", "content", "forget", "info", "propagate", "slaves", NULL }; static const char *const optionStringsNoDep[] = { "configure", "content", "forget", "info", "propagate", NULL }; enum options { -#ifndef TK_NO_DEPRECATED - PACK_AFTER, PACK_APPEND, PACK_BEFORE, PACK_UNPACK, -#endif /* !TK_NO_DEPRECATED */ PACK_CONFIGURE, PACK_CONTENT, PACK_FORGET, PACK_INFO, PACK_PROPAGATE, PACK_SLAVES }; int index; @@ -239,72 +229,6 @@ Tk_PackObjCmd( argv2 = Tcl_GetString(objv[2]); switch ((enum options) index) { -#ifndef TK_NO_DEPRECATED - case PACK_AFTER: { - Packer *prevPtr; - Tk_Window tkwin2; - - if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) { - return TCL_ERROR; - } - prevPtr = GetPacker(tkwin2); - if (prevPtr->containerPtr == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "window \"%s\" isn't packed", argv2)); - Tcl_SetErrorCode(interp, "TK", "PACK", "NOT_PACKED", NULL); - return TCL_ERROR; - } - return PackAfter(interp, prevPtr, prevPtr->containerPtr, objc-3, objv+3); - } - case PACK_APPEND: { - Packer *containerPtr; - Packer *prevPtr; - Tk_Window tkwin2; - - if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) { - return TCL_ERROR; - } - containerPtr = GetPacker(tkwin2); - prevPtr = containerPtr->contentPtr; - if (prevPtr != NULL) { - while (prevPtr->nextPtr != NULL) { - prevPtr = prevPtr->nextPtr; - } - } - return PackAfter(interp, prevPtr, containerPtr, objc-3, objv+3); - } - case PACK_BEFORE: { - Packer *packPtr, *containerPtr; - Packer *prevPtr; - Tk_Window tkwin2; - - if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) { - return TCL_ERROR; - } - packPtr = GetPacker(tkwin2); - if (packPtr->containerPtr == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "window \"%s\" isn't packed", argv2)); - Tcl_SetErrorCode(interp, "TK", "PACK", "NOT_PACKED", NULL); - return TCL_ERROR; - } - containerPtr = packPtr->containerPtr; - prevPtr = containerPtr->contentPtr; - if (prevPtr == packPtr) { - prevPtr = NULL; - } else { - for ( ; ; prevPtr = prevPtr->nextPtr) { - if (prevPtr == NULL) { - Tcl_Panic("\"pack before\" couldn't find predecessor"); - } - if (prevPtr->nextPtr == packPtr) { - break; - } - } - } - return PackAfter(interp, prevPtr, containerPtr, objc-3, objv+3); - } -#endif /* !TK_NO_DEPRECATED */ case PACK_CONFIGURE: if (argv2[0] != '.') { Tcl_SetObjResult(interp, Tcl_ObjPrintf( @@ -467,31 +391,6 @@ Tk_PackObjCmd( Tcl_SetObjResult(interp, resultObj); break; } -#ifndef TK_NO_DEPRECATED - case PACK_UNPACK: { - Tk_Window tkwin2; - Packer *packPtr; - - if (objc != 3) { - Tcl_WrongNumArgs(interp, 2, objv, "window"); - return TCL_ERROR; - } - if (TkGetWindowFromObj(interp, tkwin, objv[2], &tkwin2) != TCL_OK) { - return TCL_ERROR; - } - packPtr = GetPacker(tkwin2); - if ((packPtr != NULL) && (packPtr->containerPtr != NULL)) { - Tk_ManageGeometry(tkwin2, NULL, NULL); - if (packPtr->containerPtr->tkwin != Tk_Parent(packPtr->tkwin)) { - Tk_UnmaintainGeometry(packPtr->tkwin, - packPtr->containerPtr->tkwin); - } - Unlink(packPtr); - Tk_UnmapWindow(packPtr->tkwin); - } - break; - } -#endif /* !TK_NO_DEPRECATED */ } return TCL_OK; @@ -1078,248 +977,6 @@ GetPacker( } /* - *------------------------------------------------------------------------ - * - * PackAfter -- - * - * This function does most of the real work of adding one or more windows - * into the packing order for its container. - * - * Results: - * A standard Tcl return value. - * - * Side effects: - * The geometry of the specified windows may change, both now and again - * in the future. - * - *------------------------------------------------------------------------ - */ - -#ifndef TK_NO_DEPRECATED -static int -PackAfter( - Tcl_Interp *interp, /* Interpreter for error reporting. */ - Packer *prevPtr, /* Pack windows in argv just after this - * window; NULL means pack as first child of - * containerPtr. */ - Packer *containerPtr, /* Container in which to pack windows. */ - int objc, /* Number of elements in objv. */ - Tcl_Obj *const objv[]) /* Array of lists, each containing 2 elements: - * window name and side against which to - * pack. */ -{ - Packer *packPtr; - Tk_Window tkwin, ancestor, parent; - Tcl_Obj **options; - int c; - Tcl_Size index, optionCount; - - /* - * Iterate over all of the window specifiers, each consisting of two - * arguments. The first argument contains the window name and the - * additional arguments contain options such as "top" or "padx 20". - */ - - for ( ; objc > 0; objc -= 2, objv += 2, prevPtr = packPtr) { - if (objc < 2) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "wrong # args: window \"%s\" should be followed by options", - Tcl_GetString(objv[0]))); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); - return TCL_ERROR; - } - - /* - * Find the packer for the window to be packed, and make sure that the - * window in which it will be packed is either its or a descendant of - * its parent. - */ - - if (TkGetWindowFromObj(interp, containerPtr->tkwin, objv[0], &tkwin) - != TCL_OK) { - return TCL_ERROR; - } - - parent = Tk_Parent(tkwin); - for (ancestor = containerPtr->tkwin; ; ancestor = Tk_Parent(ancestor)) { - if (ancestor == parent) { - break; - } - if (((Tk_FakeWin *) (ancestor))->flags & TK_TOP_HIERARCHY) { - badWindow: - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't pack \"%s\" inside \"%s\"", Tcl_GetString(objv[0]), - Tk_PathName(containerPtr->tkwin))); - Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "HIERARCHY", NULL); - return TCL_ERROR; - } - } - if (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY) { - goto badWindow; - } - if (tkwin == containerPtr->tkwin) { - goto badWindow; - } - packPtr = GetPacker(tkwin); - - /* - * Process options for this window. - */ - - if (Tcl_ListObjGetElements(interp, objv[1], &optionCount, &options) - != TCL_OK) { - return TCL_ERROR; - } - packPtr->side = TOP; - packPtr->anchor = TK_ANCHOR_CENTER; - packPtr->padX = packPtr->padY = 0; - packPtr->padLeft = packPtr->padTop = 0; - packPtr->iPadX = packPtr->iPadY = 0; - packPtr->flags &= ~(FILLX|FILLY|EXPAND); - packPtr->flags |= OLD_STYLE; - for (index = 0 ; index < optionCount; index++) { - Tcl_Obj *curOptPtr = options[index]; - Tcl_Size length; - const char *curOpt = Tcl_GetStringFromObj(curOptPtr, &length); - - c = curOpt[0]; - - if ((c == 't') - && (strncmp(curOpt, "top", length)) == 0) { - packPtr->side = TOP; - } else if ((c == 'b') - && (strncmp(curOpt, "bottom", length)) == 0) { - packPtr->side = BOTTOM; - } else if ((c == 'l') - && (strncmp(curOpt, "left", length)) == 0) { - packPtr->side = LEFT; - } else if ((c == 'r') - && (strncmp(curOpt, "right", length)) == 0) { - packPtr->side = RIGHT; - } else if ((c == 'e') - && (strncmp(curOpt, "expand", length)) == 0) { - packPtr->flags |= EXPAND; - } else if ((c == 'f') - && (strcmp(curOpt, "fill")) == 0) { - packPtr->flags |= FILLX|FILLY; - } else if ((length == 5) && (strcmp(curOpt, "fillx")) == 0) { - packPtr->flags |= FILLX; - } else if ((length == 5) && (strcmp(curOpt, "filly")) == 0) { - packPtr->flags |= FILLY; - } else if ((c == 'p') && (strcmp(curOpt, "padx")) == 0) { - if (optionCount <= (index+1)) { - missingPad: - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "wrong # args: \"%s\" option must be" - " followed by screen distance", curOpt)); - Tcl_SetErrorCode(interp, "TK", "OLDPACK", "BAD_PARAMETER", - NULL); - return TCL_ERROR; - } - if (TkParsePadAmount(interp, tkwin, options[index+1], - &packPtr->padLeft, &packPtr->padX) != TCL_OK) { - return TCL_ERROR; - } - packPtr->padX /= 2; - packPtr->padLeft /= 2; - packPtr->iPadX = 0; - index++; - } else if ((c == 'p') && (strcmp(curOpt, "pady")) == 0) { - if (optionCount <= (index+1)) { - goto missingPad; - } - if (TkParsePadAmount(interp, tkwin, options[index+1], - &packPtr->padTop, &packPtr->padY) != TCL_OK) { - return TCL_ERROR; - } - packPtr->padY /= 2; - packPtr->padTop /= 2; - packPtr->iPadY = 0; - index++; - } else if ((c == 'f') && (length > 1) - && (strncmp(curOpt, "frame", length) == 0)) { - if (optionCount <= (index+1)) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "wrong # args: \"frame\"" - " option must be followed by anchor point", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "OLDPACK", "BAD_PARAMETER", - NULL); - return TCL_ERROR; - } - if (Tk_GetAnchorFromObj(interp, options[index+1], - &packPtr->anchor) != TCL_OK) { - return TCL_ERROR; - } - index++; - } else { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "bad option \"%s\": should be top, bottom, left," - " right, expand, fill, fillx, filly, padx, pady, or" - " frame", curOpt)); - Tcl_SetErrorCode(interp, "TK", "OLDPACK", "BAD_PARAMETER", - NULL); - return TCL_ERROR; - } - } - - if (packPtr != prevPtr) { - /* - * Unpack this window if it's currently packed. - */ - - if (packPtr->containerPtr != NULL) { - if ((packPtr->containerPtr != containerPtr) && - (packPtr->containerPtr->tkwin - != Tk_Parent(packPtr->tkwin))) { - Tk_UnmaintainGeometry(packPtr->tkwin, - packPtr->containerPtr->tkwin); - } - Unlink(packPtr); - } - - /* - * Add the window in the correct place in its container's packing - * order, then make sure that the window is managed by us. - */ - - packPtr->containerPtr = containerPtr; - if (prevPtr == NULL) { - packPtr->nextPtr = containerPtr->contentPtr; - containerPtr->contentPtr = packPtr; - } else { - packPtr->nextPtr = prevPtr->nextPtr; - prevPtr->nextPtr = packPtr; - } - Tk_ManageGeometry(tkwin, &packerType, packPtr); - - if (!(containerPtr->flags & DONT_PROPAGATE)) { - if (TkSetGeometryContainer(interp, containerPtr->tkwin, "pack") - != TCL_OK) { - Tk_ManageGeometry(tkwin, NULL, NULL); - Unlink(packPtr); - return TCL_ERROR; - } - containerPtr->flags |= ALLOCED_CONTAINER; - } - } - } - - /* - * Arrange for the container to be re-packed at the first idle moment. - */ - - if (containerPtr->abortPtr != NULL) { - *containerPtr->abortPtr = 1; - } - if (!(containerPtr->flags & REQUESTED_REPACK)) { - containerPtr->flags |= REQUESTED_REPACK; - Tcl_DoWhenIdle(ArrangePacking, containerPtr); - } - return TCL_OK; -} -#endif /* !TK_NO_DEPRECATED */ - -/* *---------------------------------------------------------------------- * * Unlink -- diff --git a/generic/tkPkgConfig.c b/generic/tkPkgConfig.c index 5050f8a..2c32a18 100644 --- a/generic/tkPkgConfig.c +++ b/generic/tkPkgConfig.c @@ -95,14 +95,6 @@ #endif static const Tcl_Config cfg[] = { -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - {"debug", CFG_DEBUG}, - {"threaded", CFG_THREADED}, - {"profiled", CFG_PROFILED}, - {"64bit", CFG_64}, - {"optimized", CFG_OPTIMIZED}, - {"mem_debug", CFG_MEMDEBUG}, -#endif {"fontsystem", CFG_FONTSYSTEM}, /* Runtime paths to various stuff */ diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index 422407f..c546167 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -46,12 +46,6 @@ EXTERN HINSTANCE Tk_GetHINSTANCE(void); EXTERN HWND Tk_GetHWND(Window window); /* 3 */ EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd); -/* 4 */ -EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y); -/* 5 */ -EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, - WPARAM wParam, LPARAM lParam, - LRESULT *result); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* Slot 0 is reserved */ @@ -60,9 +54,7 @@ EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, /* Slot 3 is reserved */ /* 4 */ EXTERN void TkMacOSXInitAppleEvents(Tcl_Interp *interp); -/* 5 */ -EXTERN void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, - int width, int height, int flags); +/* Slot 5 is reserved */ /* 6 */ EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin); /* Slot 7 is reserved */ @@ -94,8 +86,6 @@ typedef struct TkPlatStubs { HINSTANCE (*tk_GetHINSTANCE) (void); /* 1 */ HWND (*tk_GetHWND) (Window window); /* 2 */ Tk_Window (*tk_HWNDToWindow) (HWND hwnd); /* 3 */ - void (*tk_PointerEvent) (HWND hwnd, int x, int y); /* 4 */ - int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ void (*reserved0)(void); @@ -103,7 +93,7 @@ typedef struct TkPlatStubs { void (*reserved2)(void); void (*reserved3)(void); void (*tkMacOSXInitAppleEvents) (Tcl_Interp *interp); /* 4 */ - void (*tkGenWMConfigureEvent_) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 5 */ + void (*reserved5)(void); void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */ void (*reserved7)(void); void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */ @@ -139,10 +129,6 @@ extern const TkPlatStubs *tkPlatStubsPtr; (tkPlatStubsPtr->tk_GetHWND) /* 2 */ #define Tk_HWNDToWindow \ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ -#define Tk_PointerEvent \ - (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ -#define Tk_TranslateWinEvent \ - (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* Slot 0 is reserved */ @@ -151,8 +137,7 @@ extern const TkPlatStubs *tkPlatStubsPtr; /* Slot 3 is reserved */ #define TkMacOSXInitAppleEvents \ (tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */ -#define TkGenWMConfigureEvent_ \ - (tkPlatStubsPtr->tkGenWMConfigureEvent_) /* 5 */ +/* Slot 5 is reserved */ #define TkMacOSXInvalClipRgns \ (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */ /* Slot 7 is reserved */ @@ -185,7 +170,6 @@ extern const TkPlatStubs *tkPlatStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkGenWMConfigureEvent_ #define Tk_MacOSXGetNSViewForDrawable TkMacOSXGetRootControl #endif /* _TKPLATDECLS */ diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index 67b9d2b..626451c 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.c @@ -171,7 +171,7 @@ Tk_ItemType tkRectangleType = { RectOvalCoords, /* coordProc */ DeleteRectOval, /* deleteProc */ DisplayRectOval, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ RectToPoint, /* pointProc */ RectToArea, /* areaProc */ RectOvalToPostscript, /* postscriptProc */ @@ -196,7 +196,7 @@ Tk_ItemType tkOvalType = { RectOvalCoords, /* coordProc */ DeleteRectOval, /* deleteProc */ DisplayRectOval, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ OvalToPoint, /* pointProc */ OvalToArea, /* areaProc */ RectOvalToPostscript, /* postscriptProc */ @@ -416,7 +416,7 @@ ConfigureRectOval( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **)objv, (char *) rectOvalPtr, flags|TK_CONFIG_OBJS)) { + objv, rectOvalPtr, flags)) { return TCL_ERROR; } state = itemPtr->state; diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index a776488..f21af6e 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -179,12 +179,6 @@ Tk_ScrollbarObjCmd( scrollPtr->sliderLast = 0; scrollPtr->activeField = 0; scrollPtr->activeRelief = TK_RELIEF_RAISED; -#ifndef TK_NO_DEPRECATED - scrollPtr->totalUnits = 0; - scrollPtr->windowUnits = 0; - scrollPtr->firstUnit = 0; - scrollPtr->lastUnit = 0; -#endif /* TK_NO_DEPRECATED */ scrollPtr->firstFraction = 0.0; scrollPtr->lastFraction = 0.0; scrollPtr->cursor = NULL; @@ -379,16 +373,6 @@ ScrollbarWidgetObjCmd( Tcl_WrongNumArgs(interp, 1, objv, "get"); goto error; } -#ifndef TK_NO_DEPRECATED - if (scrollPtr->flags & OLD_STYLE_COMMANDS) { - resObjs[0] = Tcl_NewWideIntObj(scrollPtr->totalUnits); - resObjs[1] = Tcl_NewWideIntObj(scrollPtr->windowUnits); - resObjs[2] = Tcl_NewWideIntObj(scrollPtr->firstUnit); - resObjs[3] = Tcl_NewWideIntObj(scrollPtr->lastUnit); - Tcl_SetObjResult(interp, Tcl_NewListObj(4, resObjs)); - break; - } -#endif /* TK_NO_DEPRECATED */ resObjs[0] = Tcl_NewDoubleObj(scrollPtr->firstFraction); resObjs[1] = Tcl_NewDoubleObj(scrollPtr->lastFraction); Tcl_SetObjResult(interp, Tcl_NewListObj(2, resObjs)); @@ -440,48 +424,6 @@ ScrollbarWidgetObjCmd( } else { scrollPtr->lastFraction = last; } -#ifndef TK_NO_DEPRECATED - scrollPtr->flags &= ~OLD_STYLE_COMMANDS; - } else if (objc == 6) { - int totalUnits, windowUnits, firstUnit, lastUnit; - if (Tcl_GetIntFromObj(interp, objv[2], &totalUnits) != TCL_OK) { - goto error; - } - if (totalUnits < 0) { - totalUnits = 0; - } - if (Tcl_GetIntFromObj(interp, objv[3], &windowUnits) != TCL_OK) { - goto error; - } - if (windowUnits < 0) { - windowUnits = 0; - } - if (Tcl_GetIntFromObj(interp, objv[4], &firstUnit) != TCL_OK) { - goto error; - } - if (Tcl_GetIntFromObj(interp, objv[5], &lastUnit) != TCL_OK) { - goto error; - } - if (totalUnits > 0) { - if (lastUnit < firstUnit) { - lastUnit = firstUnit; - } - } else { - firstUnit = lastUnit = 0; - } - scrollPtr->totalUnits = totalUnits; - scrollPtr->windowUnits = windowUnits; - scrollPtr->firstUnit = firstUnit; - scrollPtr->lastUnit = lastUnit; - if (scrollPtr->totalUnits == 0) { - scrollPtr->firstFraction = 0.0; - scrollPtr->lastFraction = 1.0; - } else { - scrollPtr->firstFraction = ((double) firstUnit)/totalUnits; - scrollPtr->lastFraction = ((double) (lastUnit+1))/totalUnits; - } - scrollPtr->flags |= OLD_STYLE_COMMANDS; -#endif /* !TK_NO_DEPRECATED */ } else { Tcl_WrongNumArgs(interp, 1, objv, "set firstFraction lastFraction"); goto error; @@ -532,7 +474,7 @@ ConfigureScrollbar( int flags) /* Flags to pass to Tk_ConfigureWidget. */ { if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs, objc, - (const char **)objv, (char *) scrollPtr, flags|TK_CONFIG_OBJS) != TCL_OK) { + objv, scrollPtr, flags) != TCL_OK) { return TCL_ERROR; } diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h index 6912e71..3543d4f 100644 --- a/generic/tkScrollbar.h +++ b/generic/tkScrollbar.h @@ -96,22 +96,6 @@ typedef struct TkScrollbar { * the OLD_STYLE_COMMANDS flag is 1. */ -#ifndef TK_NO_DEPRECATED - int totalUnits; /* Total dimension of application, in units. - * Valid only if the OLD_STYLE_COMMANDS flag - * is set. */ - int windowUnits; /* Maximum number of units that can be - * displayed in the window at once. Valid only - * if the OLD_STYLE_COMMANDS flag is set. */ - int firstUnit; /* Number of last unit visible in - * application's window. Valid only if the - * OLD_STYLE_COMMANDS flag is set. */ - int lastUnit; /* Index of last unit visible in window. - * Valid only if the OLD_STYLE_COMMANDS flag - * isn't set. */ -#else - int dummy1,dummy2,dummy3,dummy4; /* sizeof(TkScrollbar) should not depend on TK_NO_DEPRECATED */ -#endif /* TK_NO_DEPRECATED */ double firstFraction; /* Position of first visible thing in window, * specified as a fraction between 0 and * 1.0. */ @@ -157,9 +141,6 @@ typedef struct TkScrollbar { */ #define REDRAW_PENDING 1 -#ifndef TK_NO_DEPRECATED -# define OLD_STYLE_COMMANDS 2 -#endif /* TK_NO_DEPRECATED */ #define GOT_FOCUS 4 /* diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 4e7d270..a5c6460 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -39,88 +39,26 @@ MODULE_SCOPE const TkStubs tkStubs; * Remove macro that might interfere with the definition below. */ -#undef Tk_MainEx -#undef Tk_FreeXId -#undef Tk_FreeStyleFromObj -#undef Tk_GetStyleFromObj -#undef TkWinGetPlatformId #undef TkPutImage #undef XPutImage -#define TkMacOSXSetUpClippingRgn (void (*)(Drawable))(void *)doNothing -#undef TkMacOSXIsCharacterMissing -#define TkMacOSXIsCharacterMissing (int (*)(Tk_Font, unsigned int))(void *)doNothing - -#if defined(_WIN32) && !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -# define Tk_TranslateWinEvent TkTranslateWinEvent -# define Tk_PointerEvent TkWinPointerEvent -#define TkWinGetPlatformId winGetPlatformId -static int TkWinGetPlatformId(void) { - return 2; -} -#else -# define Tk_TranslateWinEvent 0 -# define Tk_PointerEvent 0 -# define TkWinGetPlatformId 0 -#endif - -#if defined(TK_NO_DEPRECATED) || (TCL_MAJOR_VERSION > 8) -# define TkSetWindowMenuBar 0 -# define TkpDrawHighlightBorder 0 -# define TkpUseWindow 0 -# define TkpSetMainMenubar 0 -# define TkpGetOtherWindow 0 -# define TkpGetSystemDefault 0 -# define TkpMakeContainer 0 -# define TkpMakeWindow 0 -#endif +#if !defined(MAC_OSX_TK) static int doNothing(void) { /* dummy implementation, no need to do anything */ return 0; } - -#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 -#define Tk_MainEx 0 -#define Tk_FreeXId 0 -#define Tk_FreeStyleFromObj 0 -#define Tk_GetStyleFromObj 0 -#define TkWinGetPlatformId 0 -#define Tk_PhotoPutBlock_NoComposite 0 -#define Tk_PhotoPutZoomedBlock_NoComposite 0 -#define Tk_PhotoExpand_Panic 0 -#define Tk_PhotoPutBlock_Panic 0 -#define Tk_PhotoPutZoomedBlock_Panic 0 -#define Tk_PhotoSetSize_Panic 0 -#define Tk_CreateOldPhotoImageFormat 0 -#else -#define Tk_FreeXId ((void (*)(Display *, XID))(void *)doNothing) -#define Tk_FreeStyleFromObj ((void (*)(Tcl_Obj *))(void *)doNothing) -#define Tk_GetStyleFromObj getStyleFromObj -static Tk_Style Tk_GetStyleFromObj(Tcl_Obj *obj) -{ - return Tk_AllocStyleFromObj(NULL, obj); -} -#endif /* !TK_NO_DEPRECATED */ - -#define TkpCmapStressed_ TkpCmapStressed -#define TkpSync_ TkpSync -#define TkUnixContainerId_ TkUnixContainerId -#define TkUnixDoOneXEvent_ TkUnixDoOneXEvent -#define TkUnixSetMenubar_ TkUnixSetMenubar -#define TkWmCleanup_ TkWmCleanup -#define TkSendCleanup_ TkSendCleanup -#define TkpTestsendCmd_ TkpTestsendCmd -#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent -#define TkGenerateActivateEvents_ TkGenerateActivateEvents -#define TkMacOSXDrawable Tk_MacOSXGetNSWindowForDrawable - -#if !defined(MAC_OSX_TK) # undef TkpWillDrawWidget # undef TkpRedrawWidget +# undef TkpDefineNativeBitmaps +# undef TkpCreateNativeBitmap +# undef TkpGetNativeAppBitmap # define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing) # define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing) +# define TkpDefineNativeBitmaps ((void (*)(void))(void *)doNothing) +# define TkpCreateNativeBitmap ((Pixmap (*)(Display *, const void *))(void *)doNothing) +# define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char*, int *, int *))(void *)doNothing) #endif #ifdef _WIN32 @@ -358,13 +296,13 @@ static const TkIntStubs tkIntStubs = { TkpClaimFocus, /* 57 */ TkpDisplayWarning, /* 58 */ TkpGetAppName, /* 59 */ - TkpGetOtherWindow, /* 60 */ + 0, /* 60 */ TkpGetWrapperWindow, /* 61 */ TkpInit, /* 62 */ TkpInitializeMenuBindings, /* 63 */ - TkpMakeContainer, /* 64 */ + 0, /* 64 */ TkpMakeMenuWindow, /* 65 */ - TkpMakeWindow, /* 66 */ + 0, /* 66 */ TkpMenuNotifyToplevelCreate, /* 67 */ TkpOpenDisplay, /* 68 */ TkPointerEvent, /* 69 */ @@ -372,8 +310,8 @@ static const TkIntStubs tkIntStubs = { TkPolygonToPoint, /* 71 */ TkPositionInTree, /* 72 */ TkpRedirectKeyEvent, /* 73 */ - TkpSetMainMenubar, /* 74 */ - TkpUseWindow, /* 75 */ + 0, /* 74 */ + 0, /* 75 */ 0, /* 76 */ TkQueueEventForAllChildren, /* 77 */ TkReadBitmapFile, /* 78 */ @@ -383,7 +321,7 @@ static const TkIntStubs tkIntStubs = { TkSelInit, /* 82 */ TkSelPropProc, /* 83 */ 0, /* 84 */ - TkSetWindowMenuBar, /* 85 */ + 0, /* 85 */ TkStringToKeysym, /* 86 */ TkThickPolyLineToArea, /* 87 */ TkWmAddToColormapWindows, /* 88 */ @@ -409,7 +347,7 @@ static const TkIntStubs tkIntStubs = { TkGetWindowFromObj, /* 108 */ TkpGetString, /* 109 */ TkpGetSubFonts, /* 110 */ - TkpGetSystemDefault, /* 111 */ + 0, /* 111 */ TkpMenuThreadInit, /* 112 */ XClipBox, /* 113 */ XCreateRegion, /* 114 */ @@ -419,37 +357,10 @@ static const TkIntStubs tkIntStubs = { XSetRegion, /* 118 */ XUnionRectWithRegion, /* 119 */ 0, /* 120 */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 121 */ -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - 0, /* 121 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - 0, /* 121 */ /* Dummy entry for stubs table backwards compatibility */ TkpCreateNativeBitmap, /* 121 */ -#endif /* AQUA */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 122 */ -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - 0, /* 122 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - 0, /* 122 */ /* Dummy entry for stubs table backwards compatibility */ TkpDefineNativeBitmaps, /* 122 */ -#endif /* AQUA */ 0, /* 123 */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 124 */ -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - 0, /* 124 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - 0, /* 124 */ /* Dummy entry for stubs table backwards compatibility */ TkpGetNativeAppBitmap, /* 124 */ -#endif /* AQUA */ 0, /* 125 */ 0, /* 126 */ 0, /* 127 */ @@ -460,7 +371,7 @@ static const TkIntStubs tkIntStubs = { 0, /* 132 */ 0, /* 133 */ 0, /* 134 */ - TkpDrawHighlightBorder, /* 135 */ + 0, /* 135 */ TkSetFocusWin, /* 136 */ TkpSetKeycodeAndState, /* 137 */ TkpGetKeySym, /* 138 */ @@ -519,7 +430,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TCL_STUB_MAGIC, 0, #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ - TkAlignImageData, /* 0 */ + TkCreateXEventSource, /* 0 */ 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ TkpGetMS, /* 3 */ @@ -552,11 +463,11 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkWinSetForegroundWindow, /* 30 */ TkWinDialogDebug, /* 31 */ TkWinGetMenuSystemDefault, /* 32 */ - TkWinGetPlatformId, /* 33 */ + TkAlignImageData, /* 33 */ TkWinSetHINSTANCE, /* 34 */ TkWinGetPlatformTheme, /* 35 */ TkWinChildProc, /* 36 */ - TkCreateXEventSource, /* 37 */ + 0, /* 37 */ TkpCmapStressed, /* 38 */ TkpSync, /* 39 */ TkUnixContainerId, /* 40 */ @@ -569,18 +480,18 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkpGetCapture, /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - TkGenerateActivateEvents, /* 0 */ - 0, /* 1 */ - TkGenerateActivateEvents_, /* 2 */ - TkPointerDeadWindow, /* 3 */ - TkpSetCapture, /* 4 */ + 0, /* 0 */ + TkAboutDlg, /* 1 */ + TkGenerateActivateEvents, /* 2 */ + TkpGetMS, /* 3 */ + TkPointerDeadWindow, /* 4 */ TkpSetCursor, /* 5 */ - TkpWmSetState, /* 6 */ - TkAboutDlg, /* 7 */ + TkpScanWindowId, /* 6 */ + TkpWmSetState, /* 7 */ TkMacOSXButtonKeyState, /* 8 */ TkMacOSXClearMenubarActive, /* 9 */ TkMacOSXDispatchMenuEvent, /* 10 */ - 0, /* 11 */ + TkpSetCapture, /* 11 */ TkMacOSXHandleTearoffMenu, /* 12 */ 0, /* 13 */ TkMacOSXDoHLEvent, /* 14 */ @@ -591,7 +502,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, /* 19 */ 0, /* 20 */ TkMacOSXInvalidateWindow, /* 21 */ - TkMacOSXIsCharacterMissing, /* 22 */ + 0, /* 22 */ TkMacOSXMakeRealWindowExist, /* 23 */ TkMacOSXMakeStippleMap, /* 24 */ TkMacOSXMenuClick, /* 25 */ @@ -599,7 +510,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkMacOSXResizable, /* 27 */ TkMacOSXSetHelpMenuItemCount, /* 28 */ TkMacOSXSetScrollbarGrow, /* 29 */ - TkMacOSXSetUpClippingRgn, /* 30 */ + 0, /* 30 */ TkMacOSXSetUpGraphicsPort, /* 31 */ TkMacOSXUpdateClipRgn, /* 32 */ 0, /* 33 */ @@ -622,25 +533,22 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkGenerateButtonEvent, /* 50 */ TkGenWMDestroyEvent, /* 51 */ TkMacOSXSetDrawingEnabled, /* 52 */ - TkpGetMS, /* 53 */ - TkMacOSXDrawable, /* 54 */ - TkpScanWindowId, /* 55 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ TkCreateXEventSource, /* 0 */ 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ - TkpCmapStressed, /* 3 */ - TkpSync, /* 4 */ - TkUnixContainerId, /* 5 */ - TkUnixDoOneXEvent, /* 6 */ - TkUnixSetMenubar, /* 7 */ - TkpScanWindowId, /* 8 */ - TkWmCleanup, /* 9 */ - TkSendCleanup, /* 10 */ + 0, /* 3 */ + 0, /* 4 */ + 0, /* 5 */ + TkpScanWindowId, /* 6 */ + 0, /* 7 */ + 0, /* 8 */ + TkpWmSetState, /* 9 */ + 0, /* 10 */ 0, /* 11 */ - TkpWmSetState, /* 12 */ - TkpTestsendCmd_, /* 13 */ + 0, /* 12 */ + 0, /* 13 */ 0, /* 14 */ 0, /* 15 */ 0, /* 16 */ @@ -665,13 +573,13 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, /* 35 */ 0, /* 36 */ 0, /* 37 */ - TkpCmapStressed_, /* 38 */ - TkpSync_, /* 39 */ - TkUnixContainerId_, /* 40 */ - TkUnixDoOneXEvent_, /* 41 */ - TkUnixSetMenubar_, /* 42 */ - TkWmCleanup_, /* 43 */ - TkSendCleanup_, /* 44 */ + TkpCmapStressed, /* 38 */ + TkpSync, /* 39 */ + TkUnixContainerId, /* 40 */ + TkUnixDoOneXEvent, /* 41 */ + TkUnixSetMenubar, /* 42 */ + TkWmCleanup, /* 43 */ + TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ #endif /* X11 */ }; @@ -848,113 +756,113 @@ static const TkIntXlibStubs tkIntXlibStubs = { XGetAtomName, /* 4 */ XKeysymToString, /* 5 */ XCreateColormap, /* 6 */ - XGContextFromGC, /* 7 */ - XKeycodeToKeysym, /* 8 */ - XStringToKeysym, /* 9 */ - XRootWindow, /* 10 */ - XSetErrorHandler, /* 11 */ - XAllocColor, /* 12 */ - XBell, /* 13 */ - XChangeProperty, /* 14 */ - XChangeWindowAttributes, /* 15 */ - XConfigureWindow, /* 16 */ - XCopyArea, /* 17 */ - XCopyPlane, /* 18 */ - XCreateBitmapFromData, /* 19 */ - XDefineCursor, /* 20 */ - XDestroyWindow, /* 21 */ - XDrawArc, /* 22 */ - XDrawLines, /* 23 */ - XDrawRectangle, /* 24 */ - XFillArc, /* 25 */ - XFillPolygon, /* 26 */ - XFillRectangles, /* 27 */ - XFreeColormap, /* 28 */ - XFreeColors, /* 29 */ - XFreeModifiermap, /* 30 */ - XGetGeometry, /* 31 */ - XGetWindowProperty, /* 32 */ - XGrabKeyboard, /* 33 */ - XGrabPointer, /* 34 */ - XKeysymToKeycode, /* 35 */ - XMapWindow, /* 36 */ - XMoveResizeWindow, /* 37 */ - XMoveWindow, /* 38 */ - XQueryPointer, /* 39 */ - XRaiseWindow, /* 40 */ - XRefreshKeyboardMapping, /* 41 */ - XResizeWindow, /* 42 */ - XSelectInput, /* 43 */ - XSendEvent, /* 44 */ - XSetIconName, /* 45 */ - XSetInputFocus, /* 46 */ - XSetSelectionOwner, /* 47 */ - XSetWindowBackground, /* 48 */ - XSetWindowBackgroundPixmap, /* 49 */ - XSetWindowBorder, /* 50 */ - XSetWindowBorderPixmap, /* 51 */ - XSetWindowBorderWidth, /* 52 */ - XSetWindowColormap, /* 53 */ - XUngrabKeyboard, /* 54 */ - XUngrabPointer, /* 55 */ - XUnmapWindow, /* 56 */ - TkPutImage, /* 57 */ - XParseColor, /* 58 */ - XCreateGC, /* 59 */ - XFreeGC, /* 60 */ - XInternAtom, /* 61 */ - XSetBackground, /* 62 */ - XSetForeground, /* 63 */ - XSetClipMask, /* 64 */ - XSetClipOrigin, /* 65 */ - XSetTSOrigin, /* 66 */ - XChangeGC, /* 67 */ - XSetFont, /* 68 */ - XSetArcMode, /* 69 */ - XSetStipple, /* 70 */ - XSetFillRule, /* 71 */ - XSetFillStyle, /* 72 */ - XSetFunction, /* 73 */ - XSetLineAttributes, /* 74 */ - _XInitImageFuncPtrs, /* 75 */ - XCreateIC, /* 76 */ - XGetVisualInfo, /* 77 */ - XSetWMClientMachine, /* 78 */ - XStringListToTextProperty, /* 79 */ - XDrawSegments, /* 80 */ - XForceScreenSaver, /* 81 */ - XDrawLine, /* 82 */ - XFillRectangle, /* 83 */ - XClearWindow, /* 84 */ - XDrawPoint, /* 85 */ - XDrawPoints, /* 86 */ - XWarpPointer, /* 87 */ - XQueryColor, /* 88 */ - XQueryColors, /* 89 */ - XQueryTree, /* 90 */ - XSync, /* 91 */ - XTranslateCoordinates, /* 92 */ - XDeleteProperty, /* 93 */ - XFreeCursor, /* 94 */ - XGetInputFocus, /* 95 */ - XmbLookupString, /* 96 */ - XNextEvent, /* 97 */ - XPutBackEvent, /* 98 */ - XSetCommand, /* 99 */ - XWindowEvent, /* 100 */ - XGetWindowAttributes, /* 101 */ - XGetWMColormapWindows, /* 102 */ - XIconifyWindow, /* 103 */ - XWithdrawWindow, /* 104 */ - XListHosts, /* 105 */ - XSetClipRectangles, /* 106 */ + XCreatePixmapCursor, /* 7 */ + XCreateGlyphCursor, /* 8 */ + XGContextFromGC, /* 9 */ + XListHosts, /* 10 */ + XKeycodeToKeysym, /* 11 */ + XStringToKeysym, /* 12 */ + XRootWindow, /* 13 */ + XSetErrorHandler, /* 14 */ + XIconifyWindow, /* 15 */ + XWithdrawWindow, /* 16 */ + XGetWMColormapWindows, /* 17 */ + XAllocColor, /* 18 */ + XBell, /* 19 */ + XChangeProperty, /* 20 */ + XChangeWindowAttributes, /* 21 */ + XClearWindow, /* 22 */ + XConfigureWindow, /* 23 */ + XCopyArea, /* 24 */ + XCopyPlane, /* 25 */ + XCreateBitmapFromData, /* 26 */ + XDefineCursor, /* 27 */ + XDeleteProperty, /* 28 */ + XDestroyWindow, /* 29 */ + XDrawArc, /* 30 */ + XDrawLines, /* 31 */ + XDrawRectangle, /* 32 */ + XFillArc, /* 33 */ + XFillPolygon, /* 34 */ + XFillRectangles, /* 35 */ + XForceScreenSaver, /* 36 */ + XFreeColormap, /* 37 */ + XFreeColors, /* 38 */ + XFreeCursor, /* 39 */ + XFreeModifiermap, /* 40 */ + XGetGeometry, /* 41 */ + XGetInputFocus, /* 42 */ + XGetWindowProperty, /* 43 */ + XGetWindowAttributes, /* 44 */ + XGrabKeyboard, /* 45 */ + XGrabPointer, /* 46 */ + XKeysymToKeycode, /* 47 */ + XLookupColor, /* 48 */ + XMapWindow, /* 49 */ + XMoveResizeWindow, /* 50 */ + XMoveWindow, /* 51 */ + XNextEvent, /* 52 */ + XPutBackEvent, /* 53 */ + XQueryColors, /* 54 */ + XQueryPointer, /* 55 */ + XQueryTree, /* 56 */ + XRaiseWindow, /* 57 */ + XRefreshKeyboardMapping, /* 58 */ + XResizeWindow, /* 59 */ + XSelectInput, /* 60 */ + XSendEvent, /* 61 */ + XSetCommand, /* 62 */ + XSetIconName, /* 63 */ + XSetInputFocus, /* 64 */ + XSetSelectionOwner, /* 65 */ + XSetWindowBackground, /* 66 */ + XSetWindowBackgroundPixmap, /* 67 */ + XSetWindowBorder, /* 68 */ + XSetWindowBorderPixmap, /* 69 */ + XSetWindowBorderWidth, /* 70 */ + XSetWindowColormap, /* 71 */ + XTranslateCoordinates, /* 72 */ + XUngrabKeyboard, /* 73 */ + XUngrabPointer, /* 74 */ + XUnmapWindow, /* 75 */ + XWindowEvent, /* 76 */ + XDestroyIC, /* 77 */ + XFilterEvent, /* 78 */ + XmbLookupString, /* 79 */ + TkPutImage, /* 80 */ + XSetClipRectangles, /* 81 */ + XParseColor, /* 82 */ + XCreateGC, /* 83 */ + XFreeGC, /* 84 */ + XInternAtom, /* 85 */ + XSetBackground, /* 86 */ + XSetForeground, /* 87 */ + XSetClipMask, /* 88 */ + XSetClipOrigin, /* 89 */ + XSetTSOrigin, /* 90 */ + XChangeGC, /* 91 */ + XSetFont, /* 92 */ + XSetArcMode, /* 93 */ + XSetStipple, /* 94 */ + XSetFillRule, /* 95 */ + XSetFillStyle, /* 96 */ + XSetFunction, /* 97 */ + XSetLineAttributes, /* 98 */ + _XInitImageFuncPtrs, /* 99 */ + XCreateIC, /* 100 */ + XGetVisualInfo, /* 101 */ + XSetWMClientMachine, /* 102 */ + XStringListToTextProperty, /* 103 */ + XDrawLine, /* 104 */ + XWarpPointer, /* 105 */ + XFillRectangle, /* 106 */ XFlush, /* 107 */ XGrabServer, /* 108 */ XUngrabServer, /* 109 */ XFree, /* 110 */ XNoOp, /* 111 */ XSynchronize, /* 112 */ - XLookupColor, /* 113 */ + XSync, /* 113 */ XVisualIDFromVisual, /* 114 */ 0, /* 115 */ 0, /* 116 */ @@ -974,9 +882,9 @@ static const TkIntXlibStubs tkIntXlibStubs = { XFillArcs, /* 130 */ XDrawArcs, /* 131 */ XDrawRectangles, /* 132 */ - 0, /* 133 */ - 0, /* 134 */ - 0, /* 135 */ + XDrawSegments, /* 133 */ + XDrawPoint, /* 134 */ + XDrawPoints, /* 135 */ XReparentWindow, /* 136 */ XPutImage, /* 137 */ XPolygonRegion, /* 138 */ @@ -985,9 +893,9 @@ static const TkIntXlibStubs tkIntXlibStubs = { XSetICValues, /* 141 */ XGetICValues, /* 142 */ XSetICFocus, /* 143 */ - XDestroyIC, /* 144 */ - XCreatePixmapCursor, /* 145 */ - XCreateGlyphCursor, /* 146 */ + 0, /* 144 */ + 0, /* 145 */ + 0, /* 146 */ XFreeFontSet, /* 147 */ XCloseIM, /* 148 */ XRegisterIMInstantiateCallback, /* 149 */ @@ -1011,8 +919,6 @@ static const TkPlatStubs tkPlatStubs = { Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ - Tk_PointerEvent, /* 4 */ - Tk_TranslateWinEvent, /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ 0, /* 0 */ @@ -1020,7 +926,7 @@ static const TkPlatStubs tkPlatStubs = { 0, /* 2 */ 0, /* 3 */ TkMacOSXInitAppleEvents, /* 4 */ - TkGenWMConfigureEvent_, /* 5 */ + 0, /* 5 */ TkMacOSXInvalClipRgns, /* 6 */ 0, /* 7 */ TkMacOSXGetRootControl, /* 8 */ @@ -1122,7 +1028,7 @@ const TkStubs tkStubs = { Tk_FreeOptions, /* 74 */ Tk_FreePixmap, /* 75 */ Tk_FreeTextLayout, /* 76 */ - Tk_FreeXId, /* 77 */ + 0, /* 77 */ Tk_GCForColor, /* 78 */ Tk_GeometryRequest, /* 79 */ Tk_Get3DBorder, /* 80 */ @@ -1163,7 +1069,7 @@ const TkStubs tkStubs = { Tk_HandleEvent, /* 115 */ Tk_IdToWindow, /* 116 */ Tk_ImageChanged, /* 117 */ - Tk_Init, /* 118 */ + 0, /* 118 */ Tk_InternAtom, /* 119 */ Tk_IntersectTextLayout, /* 120 */ Tk_MaintainGeometry, /* 121 */ @@ -1189,13 +1095,13 @@ const TkStubs tkStubs = { Tk_NameToWindow, /* 141 */ Tk_OwnSelection, /* 142 */ Tk_ParseArgv, /* 143 */ - Tk_PhotoPutBlock_NoComposite, /* 144 */ - Tk_PhotoPutZoomedBlock_NoComposite, /* 145 */ + 0, /* 144 */ + 0, /* 145 */ Tk_PhotoGetImage, /* 146 */ Tk_PhotoBlank, /* 147 */ - Tk_PhotoExpand_Panic, /* 148 */ + 0, /* 148 */ Tk_PhotoGetSize, /* 149 */ - Tk_PhotoSetSize_Panic, /* 150 */ + 0, /* 150 */ Tk_PointToChar, /* 151 */ Tk_PostscriptFontName, /* 152 */ Tk_PreserveColormap, /* 153 */ @@ -1204,7 +1110,7 @@ const TkStubs tkStubs = { Tk_ResizeWindow, /* 156 */ Tk_RestackWindow, /* 157 */ Tk_RestrictEvents, /* 158 */ - Tk_SafeInit, /* 159 */ + 0, /* 159 */ Tk_SetAppName, /* 160 */ Tk_SetBackgroundFromBorder, /* 161 */ Tk_SetClass, /* 162 */ @@ -1257,11 +1163,11 @@ const TkStubs tkStubs = { Tk_GetReliefFromObj, /* 209 */ Tk_GetScrollInfoObj, /* 210 */ Tk_InitOptions, /* 211 */ - Tk_MainEx, /* 212 */ + 0, /* 212 */ Tk_RestoreSavedOptions, /* 213 */ Tk_SetOptions, /* 214 */ Tk_InitConsoleChannels, /* 215 */ - Tk_CreateConsoleWindow, /* 216 */ + 0, /* 216 */ Tk_CreateSmoothMethod, /* 217 */ 0, /* 218 */ 0, /* 219 */ @@ -1291,8 +1197,8 @@ const TkStubs tkStubs = { Tk_SetInternalBorderEx, /* 243 */ Tk_SetMinimumRequestSize, /* 244 */ Tk_SetCaretPos, /* 245 */ - Tk_PhotoPutBlock_Panic, /* 246 */ - Tk_PhotoPutZoomedBlock_Panic, /* 247 */ + 0, /* 246 */ + 0, /* 247 */ Tk_CollapseMotionEvents, /* 248 */ Tk_RegisterStyleEngine, /* 249 */ Tk_GetStyleEngine, /* 250 */ @@ -1303,8 +1209,8 @@ const TkStubs tkStubs = { Tk_FreeStyle, /* 255 */ Tk_NameOfStyle, /* 256 */ Tk_AllocStyleFromObj, /* 257 */ - Tk_GetStyleFromObj, /* 258 */ - Tk_FreeStyleFromObj, /* 259 */ + 0, /* 258 */ + 0, /* 259 */ Tk_GetStyledElement, /* 260 */ Tk_GetElementSize, /* 261 */ Tk_GetElementBox, /* 262 */ @@ -1317,8 +1223,8 @@ const TkStubs tkStubs = { Tk_GetUserInactiveTime, /* 269 */ Tk_ResetUserInactiveTime, /* 270 */ Tk_Interp, /* 271 */ - Tk_CreateOldImageType, /* 272 */ - Tk_CreateOldPhotoImageFormat, /* 273 */ + 0, /* 272 */ + 0, /* 273 */ Tk_AlwaysShowSelection, /* 274 */ Tk_GetButtonMask, /* 275 */ Tk_GetDoublePixelsFromObj, /* 276 */ diff --git a/generic/tkTest.c b/generic/tkTest.c index dd3764e..e688a7e 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -240,7 +240,7 @@ Tktest_Init( { static int initialized = 0; - if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) { return TCL_ERROR; } if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) { @@ -305,14 +305,6 @@ Tktest_Init( } /* - * Enable testing of legacy interfaces. - */ - - if (TkOldTestInit(interp) != TCL_OK) { - return TCL_ERROR; - } - - /* * And finally add any platform specific test commands. */ diff --git a/generic/tkText.c b/generic/tkText.c index e304af4..25b78a8 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -27,16 +27,6 @@ #include "tkWinInt.h" #endif -/* - * For compatibility with Tk 4.0 through 8.4.x, we allow tabs to be - * mis-specified with non-increasing values. These are converted into tabs - * which are the equivalent of at least a character width apart. - */ - -#if (TK_MAJOR_VERSION < 9) -#define _TK_ALLOW_DECREASING_TABS -#endif - #include "tkText.h" /* @@ -4569,27 +4559,12 @@ TkTextGetTabs( * illegal. */ -#ifdef _TK_ALLOW_DECREASING_TABS - /* - * Force the tab to be a typical character width to the right of - * the previous one, and update the 'lastStop' with the changed - * position. - */ - - if (textPtr->charWidth > 0) { - tabPtr->location = (tabPtr-1)->location + textPtr->charWidth; - } else { - tabPtr->location = (tabPtr-1)->location + 8; - } - lastStop = tabPtr->location; -#else Tcl_SetObjResult(interp, Tcl_ObjPrintf( "tabs must be monotonically increasing, but \"%s\" is " "smaller than or equal to the previous tab", Tcl_GetString(objv[i]))); Tcl_SetErrorCode(interp, "TK", "VALUE", "TAB_STOP", NULL); goto error; -#endif /* _TK_ALLOW_DECREASING_TABS */ } tabArrayPtr->numTabs++; @@ -4608,7 +4583,7 @@ TkTextGetTabs( * There may be a more efficient way of getting this. */ - TkUtfToUniChar(Tcl_GetString(objv[i+1]), &ch); + Tcl_UtfToUniChar(Tcl_GetString(objv[i+1]), &ch); if (!Tcl_UniCharIsAlpha(ch)) { continue; } @@ -6187,7 +6162,7 @@ SearchCore( } } else { firstOffset = p - startOfLine + - TkUtfToUniChar(startOfLine+matchOffset,&ch); + Tcl_UtfToUniChar(startOfLine+matchOffset,&ch); } } } while (searchSpecPtr->all); diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index d4b5086..11ceb59 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -7703,7 +7703,7 @@ TkTextCharLayoutProc( if (bytesThatFit + 1 <= maxBytes) { if ((bytesThatFit == 0) && noCharsYet) { int ch; - int chLen = TkUtfToUniChar(p, &ch); + int chLen = Tcl_UtfToUniChar(p, &ch); #ifdef TK_LAYOUT_WITH_BASE_CHUNKS bytesThatFit = CharChunkMeasureChars(chunkPtr, line, diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index c08c12c..d6710b8 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -451,7 +451,7 @@ TkTextMakeByteIndex( start = segPtr->body.chars + (byteIndex - index); p = Tcl_UtfPrev(start, segPtr->body.chars); - p += TkUtfToUniChar(p, &ch); + p += Tcl_UtfToUniChar(p, &ch); indexPtr->byteIndex += p - start; } break; @@ -1665,7 +1665,7 @@ TkTextIndexForwChars( if (segPtr->typePtr == &tkTextCharType) { start = segPtr->body.chars + byteOffset; end = segPtr->body.chars + segPtr->size; - for (p = start; p < end; p += TkUtfToUniChar(p, &ch)) { + for (p = start; p < end; p += Tcl_UtfToUniChar(p, &ch)) { if (charCount == 0) { dstPtr->byteIndex += (p - start); goto forwardCharDone; @@ -2397,7 +2397,7 @@ StartEnd( if (segPtr->typePtr == &tkTextCharType) { int ch; - chSize = TkUtfToUniChar(segPtr->body.chars + offset, &ch); + chSize = Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch); if (!Tcl_UniCharIsWordChar(ch)) { break; } @@ -2442,7 +2442,7 @@ StartEnd( if (segPtr->typePtr == &tkTextCharType) { int ch; - TkUtfToUniChar(segPtr->body.chars + offset, &ch); + Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch); if (!Tcl_UniCharIsWordChar(ch)) { break; } diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 3f07142..b4ce9fe 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -1246,80 +1246,6 @@ Tk_SendVirtualEvent( Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL); } -/* 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)) -/* - *--------------------------------------------------------------------------- - * - * TkUtfToUniChar -- - * - * Almost the same as Tcl_UtfToUniChar but using int instead of Tcl_UniChar. - * This function is capable of collapsing a upper/lower surrogate pair to a - * single unicode character. So, up to 6 bytes might be consumed. - * - * Results: - * *chPtr is filled with the Tcl_UniChar, and the return value is the - * number of bytes from the UTF-8 string that were consumed. - * - * Side effects: - * None. - * - *--------------------------------------------------------------------------- - */ - -size_t -TkUtfToUniChar( - const char *src, /* The UTF-8 string. */ - int *chPtr) /* Filled with the Unicode value represented by - * the UTF-8 string. */ -{ - Tcl_UniChar uniChar = 0; - - size_t len = Tcl_UtfToUniChar(src, &uniChar); - if ((uniChar & 0xFC00) == 0xD800) { - Tcl_UniChar low = uniChar; - /* 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; - } - } - *chPtr = uniChar; - return len; -} - -/* - *--------------------------------------------------------------------------- - * - * TkUniCharToUtf -- - * - * Almost the same as Tcl_UniCharToUtf but producing 2 x 3-byte UTF-8 - * sequences for out-of-bmp characters when TCL_UTF_MAX==3. - * So, up to 6 bytes might be produced. - * - * Results: - * *buf is filled with the UTF-8 string, and the return value is the - * number of bytes produced. - * - * Side effects: - * None. - * - *--------------------------------------------------------------------------- - */ - -size_t TkUniCharToUtf(int ch, char *buf) -{ - 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); - return len + Tcl_UniCharToUtf(0xDC00 | (ch & 0x7FF), buf + len); - } - return Tcl_UniCharToUtf(ch, buf); -} -#endif /* * Local Variables: * mode: c diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 37cda60..258ef3a 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -1028,7 +1028,7 @@ TkCreateMainWindow( #ifdef STATIC_BUILD ".static" #endif -#if TCL_UTF_MAX <= (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6)) +#if TCL_UTF_MAX < 4 ".utf-16" #endif #if defined(_WIN32) @@ -3181,7 +3181,7 @@ Initialize( * Ensure that we are getting a compatible version of Tcl. */ - if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) { return TCL_ERROR; } @@ -3381,7 +3381,14 @@ Initialize( visualObj = NULL; } - code = TkListCreateFrame(NULL, interp, cmd, 1, nameObj); + Tcl_Size objc; + Tcl_Obj **objv; + + if (TCL_OK != Tcl_ListObjGetElements(interp, cmd, &objc, &objv)) { + return TCL_ERROR; + } + code = TkCreateFrame(NULL, interp, objc, objv, + 1, nameObj ? Tcl_GetString(nameObj) : NULL); Tcl_DecrRefCount(cmd); diff --git a/generic/ttk/ttk.decls b/generic/ttk/ttk.decls index 1c98b23..7826c99 100644 --- a/generic/ttk/ttk.decls +++ b/generic/ttk/ttk.decls @@ -143,8 +143,8 @@ declare 35 { # # Utilities. # -declare 40 {deprecated {}} { - int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient) +declare 40 { + int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *orient) } diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 2a13bb6..08d2df9 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -545,7 +545,7 @@ static const Ttk_ElementSpec IndicatorElementSpec = { typedef struct { Tcl_Obj *lightColorObj; Tcl_Obj *borderColorObj; - Tcl_Obj *gripCountObj; + Tcl_Obj *gripSizeObj; } GripElement; static const Ttk_ElementOptionSpec GripElementOptions[] = { @@ -553,8 +553,8 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = { offsetof(GripElement,lightColorObj), LIGHT_COLOR }, { "-bordercolor", TK_OPTION_COLOR, offsetof(GripElement,borderColorObj), DARKEST_COLOR }, - { "-gripcount", TK_OPTION_PIXELS, - offsetof(GripElement,gripCountObj), "5" }, + { "-gripsize", TK_OPTION_PIXELS, + offsetof(GripElement,gripSizeObj), "7.5p" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; @@ -567,8 +567,7 @@ static void GripElementSize( int gripSize = 0; (void)paddingPtr; - Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize); - gripSize *= 2; + Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = gripSize; } else { @@ -589,8 +588,7 @@ static void GripElementDraw( int i; (void)state; - Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize); - gripSize *= 2; + Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize); if (orient == TTK_ORIENT_HORIZONTAL) { int x = b.x + (b.width - gripSize) / 2; @@ -633,7 +631,7 @@ typedef struct { /* Common element record for scrollbar elements */ Tcl_Obj *darkColorObj; Tcl_Obj *arrowColorObj; Tcl_Obj *arrowSizeObj; - Tcl_Obj *gripCountObj; + Tcl_Obj *gripSizeObj; Tcl_Obj *sliderlengthObj; } ScrollbarElement; @@ -654,8 +652,8 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = { offsetof(ScrollbarElement,arrowColorObj), "#000000" }, { "-arrowsize", TK_OPTION_PIXELS, offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) }, - { "-gripcount", TK_OPTION_PIXELS, - offsetof(ScrollbarElement,gripCountObj), "5" }, + { "-gripsize", TK_OPTION_PIXELS, + offsetof(ScrollbarElement,gripSizeObj), "7.5p" }, { "-sliderlength", TK_OPTION_PIXELS, offsetof(ScrollbarElement,sliderlengthObj), "30" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } @@ -719,9 +717,8 @@ static void ThumbElementDraw( /* * Draw grip: */ - TtkGetOrientFromObj(NULL, sb->orientObj, &orient); - Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize); - gripSize *= 2; + Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient); + Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize); lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d); darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d); @@ -766,7 +763,7 @@ static void SliderElementSize( (void)paddingPtr; length = thickness = SCROLLBAR_THICKNESS; - TtkGetOrientFromObj(NULL, sb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &thickness); Tk_GetPixelsFromObj(NULL, tkwin, sb->sliderlengthObj, &length); if (orient == TTK_ORIENT_VERTICAL) { diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index bd02464..e102e7f 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -220,7 +220,7 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = { offsetof(IndicatorElement,colorObj), DEFAULT_BACKGROUND }, { "-indicatorrelief", TK_OPTION_RELIEF, offsetof(IndicatorElement,reliefObj), "raised" }, - { "-indicatordiameter", TK_OPTION_PIXELS, + { "-indicatorsize", TK_OPTION_PIXELS, offsetof(IndicatorElement,sizeObj), "9p" }, { "-indicatormargin", TK_OPTION_STRING, offsetof(IndicatorElement,marginObj), "0 2 4 2" }, @@ -564,7 +564,7 @@ static void SliderElementSize( (void)dummy; (void)paddingPtr; - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, slider->lengthObj, &length); Tk_GetPixelsFromObj(NULL, tkwin, slider->thicknessObj, &thickness); @@ -593,7 +593,7 @@ static void SliderElementDraw( (void)state; border = Tk_Get3DBorderFromObj(tkwin, slider->borderObj); - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth); Tk_GetReliefFromObj(NULL, slider->reliefObj, &relief); diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h index 2b074ac..9c40904 100644 --- a/generic/ttk/ttkDecls.h +++ b/generic/ttk/ttkDecls.h @@ -13,11 +13,7 @@ extern const char *TtkInitializeStubs( interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION) #else -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "Ttk", TTK_VERSION, 0, NULL) -#else -# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL) -#endif +#define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL) #endif @@ -143,9 +139,8 @@ TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box); /* Slot 38 is reserved */ /* Slot 39 is reserved */ /* 40 */ -TTK_DEPRECATED("") -int Ttk_GetOrientFromObj(Tcl_Interp *interp, - Tcl_Obj *objPtr, int *orient); +TTKAPI int Ttk_GetOrientFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Ttk_Orient *orient); typedef struct TtkStubs { int magic; @@ -193,7 +188,7 @@ typedef struct TtkStubs { void (*reserved37)(void); void (*reserved38)(void); void (*reserved39)(void); - TCL_DEPRECATED_API("") int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient); /* 40 */ + int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *orient); /* 40 */ } TtkStubs; extern const TtkStubs *ttkStubsPtr; diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 531fe01..d15f1c9 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1056,7 +1056,7 @@ static void ThumbElementSize( (void)paddingPtr; Tk_GetPixelsFromObj(NULL, tkwin, thumb->sizeObj, &size); - TtkGetOrientFromObj(NULL, thumb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, thumb->orientObj, &orient); if (orient == TTK_ORIENT_VERTICAL) { *widthPtr = size; @@ -1147,7 +1147,7 @@ static void SliderElementSize( (void)dummy; (void)paddingPtr; - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, tkwin, slider->thicknessObj, &thickness); @@ -1207,7 +1207,7 @@ typedef struct { static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { { "-foreground", TK_OPTION_COLOR, offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND }, - { "-diameter", TK_OPTION_PIXELS, + { "-size", TK_OPTION_PIXELS, offsetof(TreeitemIndicator,sizeObj), "6.75p" }, { "-indicatormargins", TK_OPTION_STRING, offsetof(TreeitemIndicator,marginObj), "2 2 4 2" }, diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 16296b2..cee050f 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -497,7 +497,7 @@ static void GeneralSeparatorElementDraw( SeparatorElement *separator = (SeparatorElement *)elementRecord; Ttk_Orient orient; - TtkGetOrientFromObj(NULL, separator->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, separator->orientObj, &orient); switch (orient) { case TTK_ORIENT_HORIZONTAL: HorizontalSeparatorElementDraw( @@ -1199,7 +1199,7 @@ static void TroughElementDraw( Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->grooveWidthObj, &grooveWidth); Tk_GetReliefFromObj(NULL, troughPtr->reliefObj, &relief); - TtkGetOrientFromObj(NULL, troughPtr->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, troughPtr->orientObj, &orient); if (grooveWidth > 0 && grooveWidth < b.height && grooveWidth < b.width) { if (orient == TTK_ORIENT_HORIZONTAL) { @@ -1268,7 +1268,7 @@ static void ThumbElementSize( (void)paddingPtr; Tk_GetPixelsFromObj(NULL, tkwin, thumb->thicknessObj, &thickness); - TtkGetOrientFromObj(NULL, thumb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, thumb->orientObj, &orient); if (orient == TTK_ORIENT_VERTICAL) { *widthPtr = thickness; @@ -1399,7 +1399,7 @@ static void SliderElementDraw( * Fill the thin trough area preceding the * slider's center with the inner color */ - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); switch (orient) { case TTK_ORIENT_HORIZONTAL: XFillRectangle(disp, d, gc, troughInnerBox.x, troughInnerBox.y, @@ -1535,7 +1535,7 @@ static void PbarElementSize( (void)dummy; (void)paddingPtr; - TtkGetOrientFromObj(NULL, pbar->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, pbar->thicknessObj, &thickness); Tk_GetPixelsFromObj(NULL, tkwin, pbar->lengthObj, &length); Tk_GetPixelsFromObj(NULL, tkwin, pbar->borderWidthObj, &borderWidth); diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index f0fe2fc..66d6e3d 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -300,8 +300,8 @@ static char *EntryDisplayString(const char *showChar, int numChars) int ch; char buf[6]; - TkUtfToUniChar(showChar, &ch); - size = TkUniCharToUtf(ch, buf); + Tcl_UtfToUniChar(showChar, &ch); + size = Tcl_UniCharToUtf(ch, buf); p = displayString = (char *)ckalloc(numChars * size + 1); while (numChars--) { @@ -458,7 +458,7 @@ ExpandPercents( */ ++templ; /* skip over % */ if (*templ != '\0') { - templ += TkUtfToUniChar(templ, &ch); + templ += Tcl_UtfToUniChar(templ, &ch); } else { ch = '%'; } @@ -508,7 +508,7 @@ ExpandPercents( string = Tk_PathName(entryPtr->core.tkwin); break; default: - length = TkUniCharToUtf(ch, numStorage); + length = Tcl_UniCharToUtf(ch, numStorage); numStorage[length] = '\0'; string = numStorage; break; diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index 716c477..fcc069b 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -55,17 +55,7 @@ const char *const ttkOrientStrings[] = { "horizontal", "vertical", NULL }; -#if !defined(TK_NO_DEPRECATED) && TK_MAJOR_VERSION < 9 int Ttk_GetOrientFromObj( - Tcl_Interp *interp, Tcl_Obj *objPtr, int *resultPtr) -{ - *resultPtr = TTK_ORIENT_HORIZONTAL; - return Tcl_GetIndexFromObj(interp, objPtr, ttkOrientStrings, - "orientation", 0, resultPtr); -} -#endif - -int TtkGetOrientFromObj( Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *resultPtr) { int orient = (int)TTK_ORIENT_HORIZONTAL; diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 9e09195..76a65ca 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -54,11 +54,7 @@ static const Ttk_ElementOptionSpec TextElementOptions[] = { { "-foreground", TK_OPTION_COLOR, offsetof(TextElement,foregroundObj), "black" }, { "-underline", TK_OPTION_INDEX, -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) - offsetof(TextElement,underlineObj), "-1"}, -#else offsetof(TextElement,underlineObj), NULL}, -#endif { "-width", TK_OPTION_INT, offsetof(TextElement,widthObj), "-1"}, { "-anchor", TK_OPTION_ANCHOR, @@ -518,11 +514,7 @@ static const Ttk_ElementOptionSpec LabelElementOptions[] = { { "-foreground", TK_OPTION_COLOR, offsetof(LabelElement,text.foregroundObj), "black" }, { "-underline", TK_OPTION_INDEX, -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) offsetof(LabelElement,text.underlineObj), "-1"}, -#else - offsetof(LabelElement,text.underlineObj), NULL}, -#endif { "-width", TK_OPTION_INT, offsetof(LabelElement,text.widthObj), ""}, { "-anchor", TK_OPTION_ANCHOR, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 17ccd3a..d365c99 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -1123,10 +1123,9 @@ static int NotebookIdentifyCommand( } break; case IDENTIFY_TAB: -#if !defined TK_NO_DEPRECATED && (TCL_MAJOR_VERSION < 9) - if (tabIndex >= 0) -#endif - Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex)); + if (tabIndex >= 0) { + Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex)); + } break; } return TCL_OK; @@ -1151,10 +1150,9 @@ static int NotebookIndexCommand( status = FindTabIndex(interp, nb, objv[2], &index); if (status == TCL_OK) { -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) - if (index >= 0) -#endif - Tcl_SetObjResult(interp, TkNewIndexObj(index)); + if (index >= 0) { + Tcl_SetObjResult(interp, TkNewIndexObj(index)); + } } return status; diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c index b23c698..2b551b6 100644 --- a/generic/ttk/ttkProgress.c +++ b/generic/ttk/ttkProgress.c @@ -303,7 +303,7 @@ static int ProgressbarSize(void *recordPtr, int *widthPtr, int *heightPtr) /* Override requested width (height) based on -length and -orient */ Tk_GetPixelsFromObj(NULL, pb->core.tkwin, pb->progress.lengthObj, &length); - TtkGetOrientFromObj(NULL, pb->progress.orientObj, &orient); + Ttk_GetOrientFromObj(NULL, pb->progress.orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = length; @@ -376,7 +376,7 @@ static void ProgressbarDoLayout(void *recordPtr) Tcl_GetDoubleFromObj(NULL, pb->progress.valueObj, &value); Tcl_GetDoubleFromObj(NULL, pb->progress.maximumObj, &maximum); - TtkGetOrientFromObj(NULL, pb->progress.orientObj, &orient); + Ttk_GetOrientFromObj(NULL, pb->progress.orientObj, &orient); if (pbar) { double fraction = value / maximum; diff --git a/generic/ttk/ttkStubInit.c b/generic/ttk/ttkStubInit.c index 51acf3a..9d7d4fc 100644 --- a/generic/ttk/ttkStubInit.c +++ b/generic/ttk/ttkStubInit.c @@ -8,10 +8,6 @@ MODULE_SCOPE const TtkStubs ttkStubs; -#if defined(TK_NO_DEPRECATED) || TK_MAJOR_VERSION > 8 -#define Ttk_GetOrientFromObj 0 -#endif - #ifdef __GNUC__ /* * The rest of this file shouldn't warn about deprecated functions; they're diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h index a5ae350..3aab41f 100644 --- a/generic/ttk/ttkTheme.h +++ b/generic/ttk/ttkTheme.h @@ -369,9 +369,6 @@ typedef enum { /* -orient option values */ TTK_ORIENT_VERTICAL } Ttk_Orient; -MODULE_SCOPE int TtkGetOrientFromObj(Tcl_Interp *interp, - Tcl_Obj *objPtr, Ttk_Orient *orient); - /*------------------------------------------------------------------------ * +++ Utilities. */ diff --git a/generic/ttk/ttkThemeInt.h b/generic/ttk/ttkThemeInt.h index 23bbcd6..8758f85 100644 --- a/generic/ttk/ttkThemeInt.h +++ b/generic/ttk/ttkThemeInt.h @@ -43,10 +43,6 @@ MODULE_SCOPE void TtkSetBlinkCursorTimes(Tcl_Interp* interp); MODULE_SCOPE int TtkBoxEqual(Ttk_Box, Ttk_Box); -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -# define TTK_OPTION_UNDERLINE_DEF(type, field) "-1", offsetof(type, field), TCL_INDEX_NONE, 0, NULL -#else -# define TTK_OPTION_UNDERLINE_DEF(type, field) NULL, offsetof(type, field), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL -#endif +#define TTK_OPTION_UNDERLINE_DEF(type, field) NULL, offsetof(type, field), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL #endif /* _TTKTHEMEINT */ diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 11de5e0..4079dc2 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -3245,6 +3245,50 @@ static int TreeviewDetachCommand( return TCL_OK; } +/* Is an item detached? The root is never detached. */ +static int IsDetached(Treeview *tv, TreeItem *item) +{ + return item->next == NULL && item->prev == NULL && + item->parent == NULL && item != tv->tree.root; +} + +/* + $tv detached ?$item? -- + * List detached items (in arbitrary order) or query the detached state of + * $item. + */ +static int TreeviewDetachedCommand( + void *recordPtr, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]) +{ + Treeview *tv = (Treeview *)recordPtr; + TreeItem *item; + + if (objc == 2) { + /* List detached items */ + Tcl_HashSearch search; + Tcl_HashEntry *entryPtr = Tcl_FirstHashEntry(&tv->tree.items, &search); + Tcl_Obj *objPtr = Tcl_NewObj(); + + while (entryPtr != NULL) { + item = (TreeItem *)Tcl_GetHashValue(entryPtr); + entryPtr = Tcl_NextHashEntry(&search); + if (IsDetached(tv, item)) { + Tcl_ListObjAppendElement(NULL, objPtr, ItemID(tv, item)); + } + } + Tcl_SetObjResult(interp, objPtr); + return TCL_OK; + } else if (objc == 3) { + /* Query; the root is never reported as detached */ + if (!(item = FindItem(interp, tv, objv[2]))) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(IsDetached(tv, item))); + return TCL_OK; + } else { + Tcl_WrongNumArgs(interp, 2, objv, "?item?"); + return TCL_ERROR; + } +} /* + $tv delete $items -- * Delete each item in $items. * @@ -4353,6 +4397,7 @@ static const Ttk_Ensemble TreeviewCommands[] = { { "configure", TtkWidgetConfigureCommand,0 }, { "delete", TreeviewDeleteCommand,0 }, { "detach", TreeviewDetachCommand,0 }, + { "detached", TreeviewDetachedCommand,0 }, { "drag", TreeviewDragCommand,0 }, { "drop", TreeviewDropCommand,0 }, { "exists", TreeviewExistsCommand,0 }, diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index d819af7..f967b7e 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -480,7 +480,7 @@ Ttk_Layout TtkWidgetGetOrientedLayout( /* Prefix: */ - TtkGetOrientFromObj(NULL, orientObj, &orient); + Ttk_GetOrientFromObj(NULL, orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) Tcl_DStringAppend(&styleName, "Horizontal.", -1); else diff --git a/library/obsolete.tcl b/library/obsolete.tcl deleted file mode 100644 index a31884d..0000000 --- a/library/obsolete.tcl +++ /dev/null @@ -1,178 +0,0 @@ -# obsolete.tcl -- -# -# This file contains obsolete procedures that people really shouldn't -# be using anymore, but which are kept around for backward compatibility. -# -# Copyright © 1994 The Regents of the University of California. -# Copyright © 1994 Sun Microsystems, Inc. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# - -# The procedures below are here strictly for backward compatibility with -# Tk version 3.6 and earlier. The procedures are no longer needed, so -# they are no-ops. You should not use these procedures anymore, since -# they may be removed in some future release. - -proc tk_menuBar args {} -proc tk_bindForTraversal args {} - -# ::tk::classic::restore -- -# -# Restore the pre-8.5 (Tk classic) look as the widget defaults for classic -# Tk widgets. -# -# The value following an 'option add' call is the new 8.5 value. -# -namespace eval ::tk::classic { - # This may need to be adjusted for some window managers that are - # more aggressive with their own Xdefaults (like KDE and CDE) - variable prio "widgetDefault" -} - -proc ::tk::classic::restore {args} { - # Restore classic (8.4) look to classic Tk widgets - variable prio - - if {[llength $args]} { - foreach what $args { - ::tk::classic::restore_$what - } - } else { - foreach cmd [info procs restore_*] { - $cmd - } - } -} - -proc ::tk::classic::restore_font {args} { - # Many widgets were adjusted from hard-coded defaults to using the - # TIP#145 fonts defined in fonts.tcl (eg TkDefaultFont, TkFixedFont, ...) - # For restoring compatibility, we only correct size and weighting changes, - # as the fonts themselves remained mostly the same. - if {[tk windowingsystem] eq "x11"} { - font configure TkDefaultFont -weight bold ; # normal - font configure TkFixedFont -size -12 ; # -10 - } - # Add these with prio 21 to override value in dialog/msgbox.tcl - if {[tk windowingsystem] eq "aqua"} { - option add *Dialog.msg.font system 21; # TkCaptionFont - option add *Dialog.dtl.font system 21; # TkCaptionFont - option add *ErrorDialog*Label.font system 21; # TkCaptionFont - } else { - option add *Dialog.msg.font {Times 12} 21; # TkCaptionFont - option add *Dialog.dtl.font {Times 10} 21; # TkCaptionFont - option add *ErrorDialog*Label.font {Times -18} 21; # TkCaptionFont - } -} - -proc ::tk::classic::restore_button {args} { - variable prio - if {[tk windowingsystem] eq "x11"} { - foreach cls {Button Radiobutton Checkbutton} { - option add *$cls.borderWidth 2 $prio; # 1 - } - } -} - -proc ::tk::classic::restore_entry {args} { - variable prio - # Entry and Spinbox share core defaults - foreach cls {Entry Spinbox} { - if {[tk windowingsystem] ne "aqua"} { - option add *$cls.borderWidth 2 $prio; # 1 - } - if {[tk windowingsystem] eq "x11"} { - option add *$cls.background "#d9d9d9" $prio; # "white" - option add *$cls.selectBorderWidth 1 $prio; # 0 - } - } -} - -proc ::tk::classic::restore_listbox {args} { - variable prio - if {[tk windowingsystem] ne "win32"} { - option add *Listbox.background "#d9d9d9" $prio; # "white" - option add *Listbox.activeStyle "underline" $prio; # "dotbox" - } - if {[tk windowingsystem] ne "aqua"} { - option add *Listbox.borderWidth 2 $prio; # 1 - } - if {[tk windowingsystem] eq "x11"} { - option add *Listbox.selectBorderWidth 1 $prio; # 0 - } - # Remove focus into Listbox added for 8.5 - bind Listbox <Button-1> { - if {[winfo exists %W]} { - tk::ListboxBeginSelect %W [%W index @%x,%y] - } - } -} - -proc ::tk::classic::restore_menu {args} { - variable prio - if {[tk windowingsystem] eq "x11"} { - option add *Menu.activeBorderWidth 2 $prio; # 1 - option add *Menu.borderWidth 2 $prio; # 1 - option add *Menu.clickToFocus true $prio - option add *Menu.useMotifHelp true $prio - } - if {[tk windowingsystem] ne "aqua"} { - option add *Menu.font "TkDefaultFont" $prio; # "TkMenuFont" - } -} - -proc ::tk::classic::restore_menubutton {args} { - variable prio - option add *Menubutton.borderWidth 2 $prio; # 1 -} - -proc ::tk::classic::restore_message {args} { - variable prio - option add *Message.borderWidth 2 $prio; # 1 -} - -proc ::tk::classic::restore_panedwindow {args} { - variable prio - option add *Panedwindow.borderWidth 2 $prio; # 1 - option add *Panedwindow.sashWidth 2 $prio; # 3 - option add *Panedwindow.sashPad 2 $prio; # 0 - option add *Panedwindow.sashRelief raised $prio; # flat - option add *Panedwindow.opaqueResize 0 $prio; # 1 - if {[tk windowingsystem] ne "win32"} { - option add *Panedwindow.showHandle 1 $prio; # 0 - } -} - -proc ::tk::classic::restore_scale {args} { - variable prio - option add *Scale.borderWidth 2 $prio; # 1 - if {[tk windowingsystem] eq "x11"} { - option add *Scale.troughColor "#c3c3c3" $prio; # "#b3b3b3" - } -} - -proc ::tk::classic::restore_scrollbar {args} { - variable prio - if {[tk windowingsystem] eq "x11"} { - option add *Scrollbar.borderWidth 2 $prio; # 1 - option add *Scrollbar.highlightThickness 1 $prio; # 0 - option add *Scrollbar.width 15 $prio; # 11 - option add *Scrollbar.troughColor "#c3c3c3" $prio; # "#b3b3b3" - } -} - -proc ::tk::classic::restore_text {args} { - variable prio - if {[tk windowingsystem] ne "aqua"} { - option add *Text.borderWidth 2 $prio; # 1 - } - if {[tk windowingsystem] eq "win32"} { - option add *Text.font "TkDefaultFont" $prio; # "TkFixedFont" - } - if {[tk windowingsystem] eq "x11"} { - option add *Text.background "#d9d9d9" $prio; # white - option add *Text.selectBorderWidth 1 $prio; # 0 - } -} diff --git a/library/tclIndex b/library/tclIndex index 06f31b2..9b5f889 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -122,9 +122,6 @@ set auto_index(::tk::GenerateMenuSelect) [list source [file join $dir menu.tcl]] set auto_index(tk_popup) [list source [file join $dir menu.tcl]] set auto_index(::tk::ensure_psenc_is_loaded) [list source [file join $dir mkpsenc.tcl]] set auto_index(::tk::MessageBox) [list source [file join $dir msgbox.tcl]] -set auto_index(tk_menuBar) [list source [file join $dir obsolete.tcl]] -set auto_index(tk_bindForTraversal) [list source [file join $dir obsolete.tcl]] -set auto_index(::tk::classic::restore) [list source [file join $dir obsolete.tcl]] set auto_index(tk_optionMenu) [list source [file join $dir optMenu.tcl]] set auto_index(tk_setPalette) [list source [file join $dir palette.tcl]] set auto_index(::tk::RecolorTree) [list source [file join $dir palette.tcl]] @@ -252,6 +249,4 @@ set auto_index(::tk::ListBoxKeyAccel_Unset) [list source [file join $dir xmfbox. set auto_index(::tk::ListBoxKeyAccel_Key) [list source [file join $dir xmfbox.tcl]] set auto_index(::tk::ListBoxKeyAccel_Goto) [list source [file join $dir xmfbox.tcl]] set auto_index(::tk::ListBoxKeyAccel_Reset) [list source [file join $dir xmfbox.tcl]] -set auto_index(::tk::unsupported::ExposePrivateCommand) [list source [file join $dir unsupported.tcl]] -set auto_index(::tk::unsupported::ExposePrivateVariable) [list source [file join $dir unsupported.tcl]] set auto_index(::tk::fontchooser) [list source [file join $dir fontchooser.tcl]] diff --git a/library/tk.tcl b/library/tk.tcl index 6c37a2b..26ab1cc 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.7a6 +package require -exact tk 9.0b1 # Create a ::tk namespace namespace eval ::tk { diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl index abd0bc3..f4644ee 100644 --- a/library/ttk/clamTheme.tcl +++ b/library/ttk/clamTheme.tcl @@ -145,15 +145,15 @@ namespace eval ttk::theme::clam { -labeloutside true -labelmargins {0 0 0 3p} \ -borderwidth 2 -relief raised - ttk::style configure TScrollbar -gripcount 3.75p \ + ttk::style configure TScrollbar -gripsize 7.5p \ -arrowsize 10.5p -width 10.5p - ttk::style configure TScale -gripcount 3.75p \ + ttk::style configure TScale -gripsize 7.5p \ -arrowsize 10.5p -sliderlength 22.5p ttk::style configure TProgressbar -background $colors(-frame) \ -arrowsize 10.5p -sliderlength 22.5p - ttk::style configure Sash -sashthickness 4.5p -gripcount 7.5p + ttk::style configure Sash -sashthickness 4.5p -gripsize 15p } } diff --git a/library/unsupported.tcl b/library/unsupported.tcl deleted file mode 100644 index b5f404a..0000000 --- a/library/unsupported.tcl +++ /dev/null @@ -1,269 +0,0 @@ -# unsupported.tcl -- -# -# Commands provided by Tk without official support. Use them at your -# own risk. They may change or go away without notice. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -# ---------------------------------------------------------------------- -# Unsupported compatibility interface for folks accessing Tk's private -# commands and variable against recommended usage. -# ---------------------------------------------------------------------- - -namespace eval ::tk::unsupported { - - # Map from the old global names of Tk private commands to their - # new namespace-encapsulated names. - - variable PrivateCommands - array set PrivateCommands { - tkButtonAutoInvoke ::tk::ButtonAutoInvoke - tkButtonDown ::tk::ButtonDown - tkButtonEnter ::tk::ButtonEnter - tkButtonInvoke ::tk::ButtonInvoke - tkButtonLeave ::tk::ButtonLeave - tkButtonUp ::tk::ButtonUp - tkCancelRepeat ::tk::CancelRepeat - tkCheckRadioDown ::tk::CheckRadioDown - tkCheckRadioEnter ::tk::CheckRadioEnter - tkCheckRadioInvoke ::tk::CheckRadioInvoke - tkColorDialog ::tk::dialog::color:: - tkColorDialog_BuildDialog ::tk::dialog::color::BuildDialog - tkColorDialog_CancelCmd ::tk::dialog::color::CancelCmd - tkColorDialog_Config ::tk::dialog::color::Config - tkColorDialog_CreateSelector ::tk::dialog::color::CreateSelector - tkColorDialog_DrawColorScale ::tk::dialog::color::DrawColorScale - tkColorDialog_EnterColorBar ::tk::dialog::color::EnterColorBar - tkColorDialog_InitValues ::tk::dialog::color::InitValues - tkColorDialog_HandleRGBEntry ::tk::dialog::color::HandleRGBEntry - tkColorDialog_HandleSelEntry ::tk::dialog::color::HandleSelEntry - tkColorDialog_LeaveColorBar ::tk::dialog::color::LeaveColorBar - tkColorDialog_MoveSelector ::tk::dialog::color::MoveSelector - tkColorDialog_OkCmd ::tk::dialog::color::OkCmd - tkColorDialog_RedrawColorBars ::tk::dialog::color::RedrawColorBars - tkColorDialog_RedrawFinalColor ::tk::dialog::color::RedrawFinalColor - tkColorDialog_ReleaseMouse ::tk::dialog::color::ReleaseMouse - tkColorDialog_ResizeColorBars ::tk::dialog::color::ResizeColorBars - tkColorDialog_RgbToX ::tk::dialog::color::RgbToX - tkColorDialog_SetRGBValue ::tk::dialog::color::SetRGBValue - tkColorDialog_StartMove ::tk::dialog::color::StartMove - tkColorDialog_XToRgb ::tk::dialog::color::XToRGB - tkConsoleAbout ::tk::ConsoleAbout - tkConsoleBind ::tk::ConsoleBind - tkConsoleExit ::tk::ConsoleExit - tkConsoleHistory ::tk::ConsoleHistory - tkConsoleInit ::tk::ConsoleInit - tkConsoleInsert ::tk::ConsoleInsert - tkConsoleInvoke ::tk::ConsoleInvoke - tkConsoleOutput ::tk::ConsoleOutput - tkConsolePrompt ::tk::ConsolePrompt - tkConsoleSource ::tk::ConsoleSource - tkDarken ::tk::Darken - tkEntryAutoScan ::tk::EntryAutoScan - tkEntryBackspace ::tk::EntryBackspace - tkEntryButton1 ::tk::EntryButton1 - tkEntryClosestGap ::tk::EntryClosestGap - tkEntryGetSelection ::tk::EntryGetSelection - tkEntryInsert ::tk::EntryInsert - tkEntryKeySelect ::tk::EntryKeySelect - tkEntryMouseSelect ::tk::EntryMouseSelect - tkEntryNextWord ::tk::EntryNextWord - tkEntryPaste ::tk::EntryPaste - tkEntryPreviousWord ::tk::EntryPreviousWord - tkEntrySeeInsert ::tk::EntrySeeInsert - tkEntrySetCursor ::tk::EntrySetCursor - tkEntryTranspose ::tk::EntryTranspose - tkEventMotifBindings ::tk::EventMotifBindings - tkFDGetFileTypes ::tk::FDGetFileTypes - tkFirstMenu ::tk::FirstMenu - tkFocusGroup_BindIn ::tk::FocusGroup_BindIn - tkFocusGroup_BindOut ::tk::FocusGroup_BindOut - tkFocusGroup_Create ::tk::FocusGroup_Create - tkFocusGroup_Destroy ::tk::FocusGroup_Destroy - tkFocusGroup_In ::tk::FocusGroup_In - tkFocusGroup_Out ::tk::FocusGroup_Out - tkFocusOK ::tk::FocusOK - tkGenerateMenuSelect ::tk::GenerateMenuSelect - tkIconList ::tk::IconList - tkListbox ::tk::Listbox - tkListboxAutoScan ::tk::ListboxAutoScan - tkListboxBeginExtend ::tk::ListboxBeginExtend - tkListboxBeginSelect ::tk::ListboxBeginSelect - tkListboxBeginToggle ::tk::ListboxBeginToggle - tkListboxCancel ::tk::ListboxCancel - tkListboxDataExtend ::tk::ListboxDataExtend - tkListboxExtendUpDown ::tk::ListboxExtendUpDown - tkListboxKeyAccel_Goto ::tk::ListboxKeyAccel_Goto - tkListboxKeyAccel_Key ::tk::ListboxKeyAccel_Key - tkListboxKeyAccel_Reset ::tk::ListboxKeyAccel_Reset - tkListboxKeyAccel_Set ::tk::ListboxKeyAccel_Set - tkListboxKeyAccel_Unset ::tk::ListboxKeyAccel_Unxet - tkListboxMotion ::tk::ListboxMotion - tkListboxSelectAll ::tk::ListboxSelectAll - tkListboxUpDown ::tk::ListboxUpDown - tkListboxBeginToggle ::tk::ListboxBeginToggle - tkMbButtonUp ::tk::MbButtonUp - tkMbEnter ::tk::MbEnter - tkMbLeave ::tk::MbLeave - tkMbMotion ::tk::MbMotion - tkMbPost ::tk::MbPost - tkMenuButtonDown ::tk::MenuButtonDown - tkMenuDownArrow ::tk::MenuDownArrow - tkMenuDup ::tk::MenuDup - tkMenuEscape ::tk::MenuEscape - tkMenuFind ::tk::MenuFind - tkMenuFindName ::tk::MenuFindName - tkMenuFirstEntry ::tk::MenuFirstEntry - tkMenuInvoke ::tk::MenuInvoke - tkMenuLeave ::tk::MenuLeave - tkMenuLeftArrow ::tk::MenuLeftArrow - tkMenuMotion ::tk::MenuMotion - tkMenuNextEntry ::tk::MenuNextEntry - tkMenuNextMenu ::tk::MenuNextMenu - tkMenuRightArrow ::tk::MenuRightArrow - tkMenuUnpost ::tk::MenuUnpost - tkMenuUpArrow ::tk::MenuUpArrow - tkMessageBox ::tk::MessageBox - tkMotifFDialog ::tk::MotifFDialog - tkMotifFDialog_ActivateDList ::tk::MotifFDialog_ActivateDList - tkMotifFDialog_ActivateFList ::tk::MotifFDialog_ActivateFList - tkMotifFDialog_ActivateFEnt ::tk::MotifFDialog_ActivateFEnt - tkMotifFDialog_ActivateSEnt ::tk::MotifFDialog_ActivateSEnt - tkMotifFDialog ::tk::MotifFDialog - tkMotifFDialog_BrowseDList ::tk::MotifFDialog_BrowseDList - tkMotifFDialog_BrowseFList ::tk::MotifFDialog_BrowseFList - tkMotifFDialog_BuildUI ::tk::MotifFDialog_BuildUI - tkMotifFDialog_CancelCmd ::tk::MotifFDialog_CancelCmd - tkMotifFDialog_Config ::tk::MotifFDialog_Config - tkMotifFDialog_Create ::tk::MotifFDialog_Create - tkMotifFDialog_FileTypes ::tk::MotifFDialog_FileTypes - tkMotifFDialog_FilterCmd ::tk::MotifFDialog_FilterCmd - tkMotifFDialog_InterpFilter ::tk::MotifFDialog_InterpFilter - tkMotifFDialog_LoadFiles ::tk::MotifFDialog_LoadFiles - tkMotifFDialog_MakeSList ::tk::MotifFDialog_MakeSList - tkMotifFDialog_OkCmd ::tk::MotifFDialog_OkCmd - tkMotifFDialog_SetFilter ::tk::MotifFDialog_SetFilter - tkMotifFDialog_SetListMode ::tk::MotifFDialog_SetListMode - tkMotifFDialog_Update ::tk::MotifFDialog_Update - tkPostOverPoint ::tk::PostOverPoint - tkRecolorTree ::tk::RecolorTree - tkRestoreOldGrab ::tk::RestoreOldGrab - tkSaveGrabInfo ::tk::SaveGrabInfo - tkScaleActivate ::tk::ScaleActivate - tkScaleButtonDown ::tk::ScaleButtonDown - tkScaleButton2Down ::tk::ScaleButton2Down - tkScaleControlPress ::tk::ScaleControlPress - tkScaleDrag ::tk::ScaleDrag - tkScaleEndDrag ::tk::ScaleEndDrag - tkScaleIncrement ::tk::ScaleIncrement - tkScreenChanged ::tk::ScreenChanged - tkScrollButtonDown ::tk::ScrollButtonDown - tkScrollButton2Down ::tk::ScrollButton2Down - tkScrollButtonDrag ::tk::ScrollButtonDrag - tkScrollButtonUp ::tk::ScrollButtonUp - tkScrollByPages ::tk::ScrollByPages - tkScrollByUnits ::tk::ScrollByUnits - tkScrollEndDrag ::tk::ScrollEndDrag - tkScrollSelect ::tk::ScrollSelect - tkScrollStartDrag ::tk::ScrollStartDrag - tkScrollTopBottom ::tk::ScrollTopBottom - tkScrollToPos ::tk::ScrollToPos - tkTabToWindow ::tk::TabToWindow - tkTearOffMenu ::tk::TearOffMenu - tkTextAutoScan ::tk::TextAutoScan - tkTextButton1 ::tk::TextButton1 - tkTextClosestGap ::tk::TextClosestGap - tkTextInsert ::tk::TextInsert - tkTextKeyExtend ::tk::TextKeyExtend - tkTextKeySelect ::tk::TextKeySelect - tkTextNextPara ::tk::TextNextPara - tkTextNextPos ::tk::TextNextPos - tkTextNextWord ::tk::TextNextWord - tkTextPaste ::tk::TextPaste - tkTextPrevPara ::tk::TextPrevPara - tkTextPrevPos ::tk::TextPrevPos - tkTextPrevWord ::tk::TextPrevWord - tkTextResetAnchor ::tk::TextResetAnchor - tkTextScrollPages ::tk::TextScrollPages - tkTextSelectTo ::tk::TextSelectTo - tkTextSetCursor ::tk::TextSetCursor - tkTextTranspose ::tk::TextTranspose - tkTextUpDownLine ::tk::TextUpDownLine - tkTraverseToMenu ::tk::TraverseToMenu - tkTraverseWithinMenu ::tk::TraverseWithinMenu - unsupported1 ::tk::unsupported::MacWindowStyle - } - - # Map from the old global names of Tk private variable to their - # new namespace-encapsulated names. - - variable PrivateVariables - array set PrivateVariables { - droped_to_start ::tk::mac::Droped_to_start - histNum ::tk::HistNum - stub_location ::tk::mac::Stub_location - tkFocusIn ::tk::FocusIn - tkFocusOut ::tk::FocusOut - tkPalette ::tk::Palette - tkPriv ::tk::Priv - tkPrivMsgBox ::tk::PrivMsgBox - } -} - -# ::tk::unsupported::ExposePrivateCommand -- -# -# Expose one of Tk's private commands to be visible under its -# old global name -# -# Arguments: -# cmd Global name by which the command was once known, -# or a glob-style pattern. -# -# Results: -# None. -# -# Side effects: -# The old command name in the global namespace is aliased to the -# new private name. - -proc ::tk::unsupported::ExposePrivateCommand {cmd} { - variable PrivateCommands - set cmds [array get PrivateCommands $cmd] - if {[llength $cmds] == 0} { - return -code error -errorcode {TK EXPOSE_PRIVATE_COMMAND} \ - "No compatibility support for \[$cmd]" - } - foreach {old new} $cmds { - namespace eval :: [list interp alias {} $old {}] $new - } -} - -# ::tk::unsupported::ExposePrivateVariable -- -# -# Expose one of Tk's private variables to be visible under its -# old global name -# -# Arguments: -# var Global name by which the variable was once known, -# or a glob-style pattern. -# -# Results: -# None. -# -# Side effects: -# The old variable name in the global namespace is aliased to the -# new private name. - -proc ::tk::unsupported::ExposePrivateVariable {var} { - variable PrivateVariables - set vars [array get PrivateVariables $var] - if {[llength $vars] == 0} { - return -code error -errorcode {TK EXPOSE_PRIVATE_VARIABLE} \ - "No compatibility support for \$$var" - } - namespace eval ::tk::mac {} - foreach {old new} $vars { - namespace eval :: [list upvar "#0" $new $old] - } -} diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj index a014934..fe3bf2d 100644 --- a/macosx/Tk.xcodeproj/project.pbxproj +++ b/macosx/Tk.xcodeproj/project.pbxproj @@ -1001,7 +1001,6 @@ F966BB7408F27A3A005CB29B /* menu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = menu.tcl; sourceTree = "<group>"; }; F966BB7508F27A3A005CB29B /* mkpsenc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mkpsenc.tcl; sourceTree = "<group>"; }; F966BB7608F27A3A005CB29B /* msgbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = msgbox.tcl; sourceTree = "<group>"; }; - F966BB8608F27A3A005CB29B /* obsolete.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = obsolete.tcl; sourceTree = "<group>"; }; F966BB8708F27A3A005CB29B /* optMenu.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = optMenu.tcl; sourceTree = "<group>"; }; F966BB8808F27A3A005CB29B /* palette.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = palette.tcl; sourceTree = "<group>"; }; F966BB8908F27A3B005CB29B /* panedwindow.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = panedwindow.tcl; sourceTree = "<group>"; }; @@ -1014,7 +1013,6 @@ F966BB9108F27A3B005CB29B /* text.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = text.tcl; sourceTree = "<group>"; }; F966BB9208F27A3B005CB29B /* tk.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tk.tcl; sourceTree = "<group>"; }; F966BB9308F27A3B005CB29B /* tkfbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tkfbox.tcl; sourceTree = "<group>"; }; - F966BB9408F27A3B005CB29B /* unsupported.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = unsupported.tcl; sourceTree = "<group>"; }; F966BB9508F27A3B005CB29B /* xmfbox.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.tcl; sourceTree = "<group>"; }; F966BB9608F27A3B005CB29B /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; }; F966BBBA08F27A3B005CB29B /* configure.ac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure.ac; sourceTree = "<group>"; }; @@ -2453,7 +2451,6 @@ F966BB7408F27A3A005CB29B /* menu.tcl */, F966BB7508F27A3A005CB29B /* mkpsenc.tcl */, F966BB7608F27A3A005CB29B /* msgbox.tcl */, - F966BB8608F27A3A005CB29B /* obsolete.tcl */, F966BB8708F27A3A005CB29B /* optMenu.tcl */, F966BB8808F27A3A005CB29B /* palette.tcl */, F966BB8908F27A3B005CB29B /* panedwindow.tcl */, @@ -2467,7 +2464,6 @@ F966BB9208F27A3B005CB29B /* tk.tcl */, F966BB9308F27A3B005CB29B /* tkfbox.tcl */, F96888360AF787B3000797B5 /* ttk */, - F966BB9408F27A3B005CB29B /* unsupported.tcl */, F966BB9508F27A3B005CB29B /* xmfbox.tcl */, ); path = library; diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index fb1e403..e48263f 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -27,6 +27,26 @@ */ /* + * TclNumUtfChars() is the same as Tcl_NumUtfChars(), but counting + * in UTF-16 in stead of UTF-32. For Tcl 8.7 it's a little bit + * tricky to get this function, because we are compiling with + * TCL_UTF_MAX=4. Same for TclUtfAtIndex() + */ +#if TCL_MAJOR_VERSION < 9 +# undef TclNumUtfChars +# undef TclUtfAtIndex +# ifdef USE_TCL_STUBS +# define TclNumUtfChars \ + (tclStubsPtr->tcl_NumUtfChars) /* 312 */ +# define TclUtfAtIndex \ + (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ +# else +# define TclNumUtfChars Tcl_NumUtfChars +# define TclUtfAtIndex Tcl_UtfAtIndex +# endif +#endif + +/* * The following structure represents our Macintosh-specific implementation * of a font object. */ @@ -460,21 +480,38 @@ startOfClusterObjCmd( if (stringArg == NULL) { return TCL_ERROR; } + Tcl_Size ulen = Tcl_GetCharLength(objv[1]); S = [[TKNSString alloc] initWithTclUtfBytes:stringArg length:numBytes]; - if (TkGetIntForIndex(objv[2], [S length] - 1, 0, &index) != TCL_OK) { + if (TkGetIntForIndex(objv[2], ulen - 1, 0, &index) != TCL_OK) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"", Tcl_GetString(objv[2]))); Tcl_SetErrorCode(interp, "TK", "VALUE", "INDEX", NULL); return TCL_ERROR; } + if (index > 0 && (Tcl_Size)[S length] != ulen) { + /* The string contains codepoints > \uFFFF. Determine UTF-16 index */ + Tcl_Size newIdx = 0; + for (Tcl_Size i = 0; i < index; i++) { + newIdx += 1 + (((newIdx < (Tcl_Size)[S length]-1) && ([S characterAtIndex:newIdx]&0xFC00) == 0xD800) && (([S characterAtIndex:newIdx+1]&0xFC00) == 0xDC00)); + } + index = newIdx; + } if (index >= 0) { - if ((size_t)index >= [S length]) { + if (index >= (Tcl_Size)[S length]) { index = (Tcl_Size)[S length]; } else { NSRange range = [S rangeOfComposedCharacterSequenceAtIndex:index]; index = range.location; } + if (index > 0 && (Tcl_Size)[S length] != ulen) { + /* The string contains codepoints > \uFFFF. Determine UTF-32 index */ + Tcl_Size newIdx = 1; + for (Tcl_Size i = 1; i < index; i++) { + if ((([S characterAtIndex:i-1]&0xFC00) != 0xD800) || (([S characterAtIndex:i]&0xFC00) != 0xDC00)) newIdx++; + } + index = newIdx; + } Tcl_SetObjResult(interp, TkNewIndexObj(index)); } return TCL_OK; @@ -499,14 +536,23 @@ endOfClusterObjCmd( if (stringArg == NULL) { return TCL_ERROR; } + Tcl_Size ulen = Tcl_GetCharLength(objv[1]); S = [[TKNSString alloc] initWithTclUtfBytes:stringArg length:numBytes]; - if (TkGetIntForIndex(objv[2], [S length] - 1, 0, &index) != TCL_OK) { + if (TkGetIntForIndex(objv[2], ulen - 1, 0, &index) != TCL_OK) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"", Tcl_GetString(objv[2]))); Tcl_SetErrorCode(interp, "TK", "VALUE", "INDEX", NULL); return TCL_ERROR; } + if (index > 0 && (Tcl_Size)[S length] != ulen) { + /* The string contains codepoints > \uFFFF. Determine UTF-16 index */ + Tcl_Size newIdx = 0; + for (Tcl_Size i = 0; i < index; i++) { + newIdx += 1 + (((newIdx < (Tcl_Size)[S length]-1) && ([S characterAtIndex:newIdx]&0xFC00) == 0xD800) && (([S characterAtIndex:newIdx+1]&0xFC00) == 0xDC00)); + } + index = newIdx; + } if ((size_t)index + 1 <= [S length]) { if (index < 0) { index = 0; @@ -514,6 +560,14 @@ endOfClusterObjCmd( NSRange range = [S rangeOfComposedCharacterSequenceAtIndex:index]; index = range.location + range.length; } + if (index > 0 && (Tcl_Size)[S length] != ulen) { + /* The string contains codepoints > \uFFFF. Determine UTF-32 index */ + Tcl_Size newIdx = 1; + for (Tcl_Size i = 1; i < index; i++) { + if ((([S characterAtIndex:i-1]&0xFC00) != 0xD800) || (([S characterAtIndex:i]&0xFC00) != 0xDC00)) newIdx++; + } + index = newIdx; + } Tcl_SetObjResult(interp, TkNewIndexObj(index)); } return TCL_OK; @@ -1030,8 +1084,8 @@ TkpMeasureCharsInContext( attributes:fontPtr->nsAttributes]; typesetter = CTTypesetterCreateWithAttributedString( (CFAttributedStringRef)attributedString); - start = Tcl_NumUtfChars(source, rangeStart); - len = Tcl_NumUtfChars(source + rangeStart, rangeLength); + start = TclNumUtfChars(source, rangeStart); + len = TclNumUtfChars(source + rangeStart, rangeLength); if (start > 0) { range.length = start; line = CTTypesetterCreateLine(typesetter, range); @@ -1132,7 +1186,7 @@ TkpMeasureCharsInContext( [attributedString release]; [string release]; length = ceil(width - offset); - fit = (Tcl_UtfAtIndex(source, index) - source) - rangeStart; + fit = (TclUtfAtIndex(source, index) - source) - rangeStart; done: #ifdef TK_MAC_DEBUG_FONTS TkMacOSXDbgMsg("measure: source=\"%s\" range=\"%.*s\" maxLength=%d " @@ -1331,8 +1385,8 @@ TkpDrawAngledCharsInContext( -textX, -textY); } CGContextConcatCTM(context, t); - start = Tcl_NumUtfChars(source, rangeStart); - length = Tcl_NumUtfChars(source, rangeStart + rangeLength) - start; + start = TclNumUtfChars(source, rangeStart); + length = TclNumUtfChars(source, rangeStart + rangeLength) - start; line = CTTypesetterCreateLine(typesetter, CFRangeMake(start, length)); if (start > 0) { diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index ef0d678..c7127ef 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -501,7 +501,7 @@ TkpGetString( macKC.uint = eventPtr->xkey.keycode; if (IS_PRINTABLE(macKC.v.keychar)) { - length = TkUniCharToUtf(macKC.v.keychar, utfChars); + length = Tcl_UniCharToUtf(macKC.v.keychar, utfChars); } utfChars[length] = 0; diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index c127d21..34e0e0e 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -16,34 +16,6 @@ #include "tkMacOSXPrivate.h" #include "tkMacOSXInt.h" #include "tkMacOSXConstants.h" -#if TCL_MAJOR_VERSION < 9 -#undef Tcl_MacOSXNotifierAddRunLoopMode -#ifdef USE_TCL_STUBS -#ifdef __cplusplus -extern "C" { -#endif -/* Little hack to eliminate the need for "tclInt.h" here: - Just copy a small portion of TclIntPlatStubs, just - enough to make it work. See [600b72bfbc] */ -typedef struct TclIntPlatStubs { - int magic; - void *hooks; - void (*dummy[19]) (void); /* dummy entries 0-18, not used */ - void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */ -} TclIntPlatStubs; -extern const TclIntPlatStubs *tclIntPlatStubsPtr; -#ifdef __cplusplus -} -#endif -#define Tcl_MacOSXNotifierAddRunLoopMode \ - (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ -#elif TCL_MINOR_VERSION < 7 - extern void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode); -# define Tcl_MacOSXNotifierAddRunLoopMode TclMacOSXNotifierAddRunLoopMode -#else - extern void Tcl_MacOSXNotifierAddRunLoopMode(const void *runLoopMode); -#endif -#endif #import <objc/objc-auto.h> /* This is not used for anything at the moment. */ diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index dafd94f..a74b701 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -6980,7 +6980,7 @@ TkpGetWrapperWindow( *---------------------------------------------------------------------- */ -void +int TkpWmSetState( TkWindow *winPtr, /* Toplevel window to operate on. */ int state) /* One of IconicState, ZoomState, NormalState, @@ -6991,7 +6991,7 @@ TkpWmSetState( wmPtr->hints.initial_state = state; if (wmPtr->flags & WM_NEVER_MAPPED) { - return; + goto setStateEnd; } macWin = TkMacOSXGetNSWindowForDrawable(winPtr->window); @@ -7035,6 +7035,8 @@ TkpWmSetState( */ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){} +setStateEnd: + return 1; } /* diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 76b8b33..0a9a39d 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -865,6 +865,14 @@ XSetIconName( return Success; } +Bool +XFilterEvent( + TCL_UNUSED(XEvent *), + TCL_UNUSED(Window)) +{ + return 0; +} + int XForceScreenSaver( Display* display, diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 504446b..7495741 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -2480,7 +2480,7 @@ static void TrackElementDraw( double from = 0, to = 100, value = 0, fraction, max; CGRect bounds = BoxToRect(d, b); - TtkGetOrientFromObj(NULL, elem->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, elem->orientObj, &orientation); Tcl_GetDoubleFromObj(NULL, elem->fromObj, &from); Tcl_GetDoubleFromObj(NULL, elem->toObj, &to); Tcl_GetDoubleFromObj(NULL, elem->valueObj, &value); @@ -2622,7 +2622,7 @@ static void PbarElementDraw( int isIndeterminate = !strcmp("indeterminate", Tcl_GetString(pbar->modeObj)); - TtkGetOrientFromObj(NULL, pbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orientation); Tcl_GetDoubleFromObj(NULL, pbar->valueObj, &value); Tcl_GetDoubleFromObj(NULL, pbar->maximumObj, &maximum); Tcl_GetIntFromObj(NULL, pbar->phaseObj, &phase); @@ -2697,7 +2697,7 @@ static void TroughElementSize( Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL; SInt32 thickness = 15; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); ChkErr(GetThemeMetric, kThemeMetricScrollBarWidth, &thickness); if (orientation == TTK_ORIENT_HORIZONTAL) { *minHeight = thickness; @@ -2725,7 +2725,7 @@ static void TroughElementDraw( CGRect bounds = BoxToRect(d, b); GrayColor bgGray; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); if (orientation == TTK_ORIENT_HORIZONTAL) { bounds = CGRectInset(bounds, 0, 1); } else { @@ -2761,7 +2761,7 @@ static void ThumbElementSize( ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); if (orientation == TTK_ORIENT_VERTICAL) { *minHeight = 18; *minWidth = 8; @@ -2782,7 +2782,7 @@ static void ThumbElementDraw( ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); /* * In order to make ttk scrollbars work correctly it is necessary to be diff --git a/tests/cluster.test b/tests/cluster.test index 724283a..1ef9424 100644 --- a/tests/cluster.test +++ b/tests/cluster.test @@ -15,53 +15,53 @@ testConstraint needsICU [expr {[catch {info body ::tk::startOfCluster}]}] test cluster-1.0 {::tk::startOfCluster} -body { - ::tk::startOfCluster 🤡 -1 + ::tk::startOfCluster é -1 } -result {} test cluster-1.1 {::tk::startOfCluster} -body { - ::tk::startOfCluster 🤡 0 + ::tk::startOfCluster é 0 } -result 0 test cluster-1.2 {::tk::startOfCluster} -constraints needsICU -body { - ::tk::startOfCluster 🤡 1 + ::tk::startOfCluster é 1 } -result 0 test cluster-1.3 {::tk::startOfCluster} -constraints needsICU -body { - ::tk::startOfCluster 🤡 2 + ::tk::startOfCluster é 2 } -result 2 test cluster-1.4 {::tk::startOfCluster} -constraints needsICU -body { - ::tk::startOfCluster 🤡 3 + ::tk::startOfCluster é 3 } -result 2 test cluster-1.5 {::tk::startOfCluster} -constraints needsICU -body { - ::tk::startOfCluster 🤡 end + ::tk::startOfCluster é end } -result 0 test cluster-1.6 {::tk::startOfCluster} -body { - ::tk::startOfCluster 🤡 {} + ::tk::startOfCluster é {} } -result {} test cluster-1.7 {::tk::startOfCluster} -constraints needsICU -body { - ::tk::startOfCluster 🤡 end-1 + ::tk::startOfCluster é end-1 } -result 0 test cluster-2.0 {::tk::endOfCluster} -body { - ::tk::endOfCluster 🤡 -1 + ::tk::endOfCluster é -1 } -result 0 test cluster-2.1 {::tk::endOfCluster} -constraints needsICU -body { - ::tk::endOfCluster 🤡 0 + ::tk::endOfCluster é 0 } -result 2 test cluster-2.2 {::tk::endOfCluster} -constraints needsICU -body { - ::tk::endOfCluster 🤡 1 + ::tk::endOfCluster é 1 } -result 2 test cluster-2.3 {::tk::endOfCluster} -body { - ::tk::endOfCluster 🤡 2 + ::tk::endOfCluster é 2 } -result {} test cluster-2.4 {::tk::endOfCluster} -body { - ::tk::endOfCluster 🤡 3 + ::tk::endOfCluster é 3 } -result {} test cluster-2.5 {::tk::endOfCluster} -constraints needsICU -body { - ::tk::endOfCluster 🤡 end + ::tk::endOfCluster é end } -result 2 test cluster-2.6 {::tk::endOfCluster} -body { - ::tk::endOfCluster 🤡 {} + ::tk::endOfCluster é {} } -result 0 test cluster-2.7 {::tk::endOfCluster} -constraints needsICU -body { - ::tk::endOfCluster 🤡 end-1 + ::tk::endOfCluster é end-1 } -result 2 test cluster-3.0 {::tk::endOfWord} -body { diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 5a88a29..6ca3bc6 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -51,12 +51,6 @@ # ImgGetPhoto: no tests # Tk_PhotoGetImage no tests # ImgPostscriptPhoto no tests -# Tk_PhotoPutBlock_NoComposite no tests, probably none needed -# Tk_PhotoPutZoomedBlock_NoComposite no tests, probably none needed -# Tk_PhotoExpand_Panic no tests, probably none needed -# Tk_PhotoPutBlock_Panic no tests, probably none needed -# Tk_PhotoPutZoomedBlock_Panic no tests, probably none needed -# Tk_PhotoSetSize_Panic no tests, probably none needed # Tk_PhotoGetMetadata: imgPhoto-21.* # Tk_PhotoSetMetadata: imgPhoto-22.* #-------------------------------------------------------------------------- diff --git a/tests/scrollbar.test b/tests/scrollbar.test index aac01e5..48eb734 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -316,10 +316,6 @@ destroy .t test scrollbar-3.43 {ScrollbarWidgetCmd procedure, "get" option} { list [catch {.s get a} msg] $msg } {1 {wrong # args: should be ".s get"}} -test scrollbar-3.44 {ScrollbarWidgetCmd procedure, "get" option} deprecated { - .s set 100 10 13 14 - .s get -} {100 10 13 14} test scrollbar-3.45 {ScrollbarWidgetCmd procedure, "get" option} { .s set 0.6 0.8 set result {} @@ -401,30 +397,6 @@ test scrollbar-3.63 {ScrollbarWidgetCmd procedure, "set" option} { } set result } {0.4 0.4} -test scrollbar-3.64 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - list [catch {.s set abc def ghi jkl} msg] $msg -} {1 {expected integer but got "abc"}} -test scrollbar-3.65 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - list [catch {.s set 1 def ghi jkl} msg] $msg -} {1 {expected integer but got "def"}} -test scrollbar-3.66 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - list [catch {.s set 1 2 ghi jkl} msg] $msg -} {1 {expected integer but got "ghi"}} -test scrollbar-3.67 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - list [catch {.s set 1 2 3 jkl} msg] $msg -} {1 {expected integer but got "jkl"}} -test scrollbar-3.68 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - .s set -10 50 20 30 - .s get -} {0 50 0 0} -test scrollbar-3.69 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - .s set 100 -10 20 30 - .s get -} {100 0 20 30} -test scrollbar-3.70 {ScrollbarWidgetCmd procedure, "set" option} deprecated { - .s set 100 50 30 20 - .s get -} {100 50 30 30} test scrollbar-3.71 {ScrollbarWidgetCmd procedure, "set" option} { list [catch {.s set 1 2 3} msg] $msg } {1 {wrong # args: should be ".s set firstFraction lastFraction"}} diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test index 9cc1a48..af0417a 100644 --- a/tests/ttk/entry.test +++ b/tests/ttk/entry.test @@ -67,7 +67,7 @@ test entry-1.7 "Deletion - insert cursor in the middle " -body { .e index insert } -result 0 -test entry-1.8 "Index is between 0 and end" -constraints deprecated -body { +test entry-1.8 "Index is between 0 and end" -body { .e delete 0 end .e insert end abcde set res [list [.e index -1] [.e index -4] [.e index 999]] diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index 5f2cc84..b424dfb 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -191,10 +191,11 @@ test treeview-3.5 "index - exhaustive test" -body { } -result [list 0 1 2 3 4 5 6] test treeview-3.6 "detach" -body { + set before [.tv detached newnode] .tv detach newnode consistencyCheck .tv - .tv children {} -} -result [list newfirstone firstnode anotherone onemore lastnode newlastone] + list [.tv children {}] [.tv detached] $before [.tv detached newnode] +} -result {{newfirstone firstnode anotherone onemore lastnode newlastone} newnode 0 1} # XREF: treeview-2.13 test treeview-3.7 "detach didn't screw up internal links" -body { @@ -229,17 +230,19 @@ test treeview-3.11 "Can't detach root item" -body { } -returnCodes error -result "Cannot detach root item" test treeview-3.12 "Reattach" -body { + set before [.tv detached newnode] .tv move newnode {} end consistencyCheck .tv - .tv children {} -} -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode] + list [.tv children {}] $before [.tv detached newnode] [.tv detached] +} -result {{newfirstone firstnode anotherone onemore lastnode newlastone newnode} 1 0 {}} # Bug # ????? test treeview-3.13 "Re-reattach" -body { + set before [.tv detached newnode] .tv move newnode {} end consistencyCheck .tv - .tv children {} -} -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode] + list [.tv children {}] $before [.tv detached newnode] +} -result {{newfirstone firstnode anotherone onemore lastnode newlastone newnode} 0 0} catch { .tv insert newfirstone end -id x1 diff --git a/unix/Makefile.in b/unix/Makefile.in index 99aee52..cce7c65 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -112,7 +112,7 @@ TCL_PLATFORM_DIR = $(TCLDIR)/unix # for this version of Tk: TCL_BIN_DIR = @TCL_BIN_DIR@ -# The linker flags needed to link in the Tcl library (ex: -ltcl8.7) +# The linker flags needed to link in the Tcl library (ex: -ltcl9.0) TCL_LIB_FLAG = @TCL_LIB_FLAG@ # Flag, 1: we're building a shared lib, 0 we're not @@ -335,7 +335,7 @@ CC_SWITCHES_NO_STUBS = -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \ ${@TK_WINDOWINGSYSTEM@_INCLUDES} ${CFLAGS} ${CFLAGS_WARNING} \ ${SHLIB_CFLAGS} -I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${AC_FLAGS} \ ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \ -${NO_DEPRECATED_FLAGS} -DTCL_UTF_MAX=3 @EXTRA_CC_SWITCHES@ +${NO_DEPRECATED_FLAGS} -DTCL_UTF_MAX=4 @EXTRA_CC_SWITCHES@ CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @TCL_STUB_FLAGS@ @@ -348,7 +348,7 @@ ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ WISH_OBJS = tkAppInit.o -TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o tkOldTest.o \ +TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o \ $(@TK_WINDOWINGSYSTEM@_TKTEST_OBJS) WIDG_OBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \ @@ -462,7 +462,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tkTextImage.c \ $(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \ $(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \ - $(GENERIC_DIR)/tkOldConfig.c $(GENERIC_DIR)/tkOldTest.c \ + $(GENERIC_DIR)/tkOldConfig.c \ $(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \ $(GENERIC_DIR)/tkStubInit.c @@ -649,9 +649,9 @@ ${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS} ${TK_ZIP_FILE} fi ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} - @if test "x${LIB_FILE}" = "xlibtk${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \ - (cd ${TOP_DIR}/win; ${MAKE} tk${MAJOR_VERSION}${MINOR_VERSION}.dll); \ - cp "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll" .; \ + @if test "x${LIB_FILE}" = "xlibtcl9tk${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \ + (cd ${TOP_DIR}/win; ${MAKE} tcl9tk${MAJOR_VERSION}${MINOR_VERSION}.dll); \ + cp "${TOP_DIR}/win/tcl9tk${MAJOR_VERSION}${MINOR_VERSION}.dll" .; \ fi rm -f $@ @MAKE_STUB_LIB@ @@ -1241,9 +1241,6 @@ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhoto.h tkImgPhInstance.o: $(GENERIC_DIR)/tkImgPhInstance.c $(GENERIC_DIR)/tkImgPhoto.h $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhInstance.c -tkOldTest.o: $(GENERIC_DIR)/tkOldTest.c - $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkOldTest.c - tkTest.o: $(GENERIC_DIR)/tkTest.c tkUuid.h $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkTest.c diff --git a/unix/configure b/unix/configure index d528c32..01c6310 100755 --- a/unix/configure +++ b/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for tk 8.7. +# Generated by GNU Autoconf 2.71 for tk 9.0. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tk' PACKAGE_TARNAME='tk' -PACKAGE_VERSION='8.7' -PACKAGE_STRING='tk 8.7' +PACKAGE_VERSION='9.0' +PACKAGE_STRING='tk 9.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tk 8.7 to adapt to many kinds of systems. +\`configure' configures tk 9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1448,7 +1448,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tk 8.7:";; + short | recursive ) echo "Configuration of tk 9.0:";; esac cat <<\_ACEOF @@ -1564,7 +1564,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tk configure 8.7 +tk configure 9.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1920,7 +1920,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tk $as_me 8.7, which was +It was created by tk $as_me 9.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2582,10 +2582,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.0 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=0 +TK_PATCH_LEVEL="b1" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -2678,11 +2678,11 @@ printf "%s\n" "$as_me: WARNING: --with-tcl argument should refer to directory co `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tcl8.7 2>/dev/null` \ + `ls -d /usr/lib/tcl9.0 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \ + `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" @@ -2780,12 +2780,8 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" -ne 8 ; then - as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ -Found config for Tcl ${TCL_VERSION}" "$LINENO" 5 -fi -if test "${TCL_MINOR_VERSION}" -lt 6 ; then - as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ +if test "${TCL_MINOR_VERSION}" -lt 7 ; then + as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}" "$LINENO" 5 fi fi @@ -6252,6 +6248,33 @@ printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h fi + # Check for vfork, posix_spawnp() and friends unconditionally + ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork" +if test "x$ac_cv_func_vfork" = xyes +then : + printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp" +if test "x$ac_cv_func_posix_spawnp" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_adddup2" "ac_cv_func_posix_spawn_file_actions_adddup2" +if test "x$ac_cv_func_posix_spawn_file_actions_adddup2" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "posix_spawnattr_setflags" "ac_cv_func_posix_spawnattr_setflags" +if test "x$ac_cv_func_posix_spawnattr_setflags" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h + +fi + + # FIXME: This subst was left in only because the TCL_DL_LIBS # entry in tclConfig.sh uses it. It is not clear why someone # would use TCL_DL_LIBS instead of TCL_LIBS. @@ -6453,6 +6476,56 @@ printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h tcl_flags="$tcl_flags _FILE_OFFSET_BITS" fi + + if test ${tcl_cv_flag__largefile64_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/stat.h> +int +main (void) +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + tcl_cv_flag__largefile64_source=no +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE64_SOURCE 1 +#include <sys/stat.h> +int +main (void) +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + tcl_cv_flag__largefile64_source=yes +else $as_nop + tcl_cv_flag__largefile64_source=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then + +printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h + + tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" + fi + if test "x${tcl_flags}" = "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } @@ -6642,41 +6715,6 @@ printf "%s\n" "#define HAVE_DIR64 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 -printf %s "checking for struct stat64... " >&6; } -if test ${tcl_cv_struct_stat64+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/stat.h> -int -main (void) -{ -struct stat64 p; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - tcl_cv_struct_stat64=yes -else $as_nop - tcl_cv_struct_stat64=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 -printf "%s\n" "$tcl_cv_struct_stat64" >&6; } - if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - -printf "%s\n" "#define HAVE_STRUCT_STAT64 1" >>confdefs.h - - fi - ac_fn_c_check_func "$LINENO" "open64" "ac_cv_func_open64" if test "x$ac_cv_func_open64" = xyes then : @@ -8917,17 +8955,8 @@ fi #-------------------------------------------------------------------- # Replace ${VERSION} with contents of ${TK_VERSION} -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then TK_STUB_LIB_FILE="libtkstub.a" TK_STUB_LIB_FLAG="-ltkstub" -else - eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" -if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}" -else - TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`" -fi -fi eval "TK_STUB_LIB_DIR=\"${libdir}\"" TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" @@ -9548,7 +9577,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tk $as_me 8.7, which was +This file was extended by tk $as_me 9.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9607,7 +9636,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -tk config.status 8.7 +tk config.status 9.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/unix/configure.ac b/unix/configure.ac index c2c20f4..537bc13 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. -AC_INIT([tk],[8.7]) +AC_INIT([tk],[9.0]) AC_PREREQ([2.69]) dnl This is only used when included from macosx/configure.ac @@ -23,10 +23,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ #endif /* _TKCONFIG */]) ]) -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.0 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=0 +TK_PATCH_LEVEL="b1" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -38,12 +38,8 @@ SC_PATH_TCLCONFIG SC_LOAD_TCLCONFIG if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" -ne 8 ; then - AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ -Found config for Tcl ${TCL_VERSION}]) -fi -if test "${TCL_MINOR_VERSION}" -lt 6 ; then - AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ +if test "${TCL_MINOR_VERSION}" -lt 7 ; then + AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}]) fi fi @@ -714,17 +710,8 @@ AC_SUBST(INSTALL_MSGS) #-------------------------------------------------------------------- # Replace ${VERSION} with contents of ${TK_VERSION} -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then TK_STUB_LIB_FILE="libtkstub.a" TK_STUB_LIB_FLAG="-ltkstub" -else - eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" -if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}" -else - TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`" -fi -fi eval "TK_STUB_LIB_DIR=\"${libdir}\"" TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index a46478c..4a9fe40 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -93,11 +93,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tcl8.7 2>/dev/null` \ + `ls -d /usr/lib/tcl9.0 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \ + `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" @@ -226,11 +226,11 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tk8.7 2>/dev/null` \ + `ls -d /usr/lib/tk9.0 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tk8.7 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tk8.7 2>/dev/null` \ + `ls -d /usr/local/lib/tk9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tk9.0 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i; pwd)`" @@ -1874,6 +1874,9 @@ dnl # preprocessing tests use only CPPFLAGS. AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],) + # Check for vfork, posix_spawnp() and friends unconditionally + AC_CHECK_FUNCS(vfork posix_spawnp posix_spawn_file_actions_adddup2 posix_spawnattr_setflags) + # FIXME: This subst was left in only because the TCL_DL_LIBS # entry in tclConfig.sh uses it. It is not clear why someone # would use TCL_DL_LIBS instead of TCL_LIBS. @@ -2292,6 +2295,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [ # Might define the following vars: # _ISOC99_SOURCE # _FILE_OFFSET_BITS +# _LARGEFILE64_SOURCE # #-------------------------------------------------------------------- @@ -2315,6 +2319,8 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ [char *p = (char *)strtoll; char *q = (char *)strtoull;]) SC_TCL_EARLY_FLAG(_FILE_OFFSET_BITS,[#include <sys/stat.h>], [switch (0) { case 0: case (sizeof(off_t)==sizeof(long long)): ; }],64) + SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>], + [struct stat64 buf; int i = stat64("/", &buf);]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT([none]) else @@ -2335,7 +2341,6 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ # Might define the following vars: # TCL_WIDE_INT_IS_LONG # HAVE_STRUCT_DIRENT64, HAVE_DIR64 -# HAVE_STRUCT_STAT64 # HAVE_TYPE_OFF64_T # _TIME_BITS # @@ -2391,14 +2396,6 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ AC_DEFINE(HAVE_DIR64, 1, [Is 'DIR64' in <sys/types.h>?]) fi - AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[struct stat64 p; -]])], - [tcl_cv_struct_stat64=yes], [tcl_cv_struct_stat64=no])]) - if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?]) - fi - AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ diff --git a/unix/tk.spec b/unix/tk.spec index 6a6924c..208877f 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -4,15 +4,15 @@ Name: tk Summary: Tk graphical toolkit for the Tcl scripting language. -Version: 8.7a6 +Version: 9.0b1 Release: 2 License: BSD Group: Development/Languages Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: https://www.tcl-lang.org/ Buildroot: /var/tmp/%{name}%{version} -Buildrequires: XFree86-devel tcl >= 8.6.0 -Requires: tcl >= 8.6.0 +Buildrequires: XFree86-devel tcl >= 8.7.0 +Requires: tcl >= 8.7.0 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c index 77f7330..5252972 100644 --- a/unix/tkAppInit.c +++ b/unix/tkAppInit.c @@ -12,6 +12,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#undef USE_TCL_STUBS #undef BUILD_tk #undef STATIC_BUILD #include "tk.h" diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in index 2f6eca6..ffc0e06 100644 --- a/unix/tkConfig.h.in +++ b/unix/tkConfig.h.in @@ -34,6 +34,15 @@ /* Define to 1 if you have the `open64' function. */ #undef HAVE_OPEN64 +/* Define to 1 if you have the `posix_spawnattr_setflags' function. */ +#undef HAVE_POSIX_SPAWNATTR_SETFLAGS + +/* Define to 1 if you have the `posix_spawnp' function. */ +#undef HAVE_POSIX_SPAWNP + +/* Define to 1 if you have the `posix_spawn_file_actions_adddup2' function. */ +#undef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 + /* Does struct password have a pw_gecos field? */ #undef HAVE_PW_GECOS @@ -58,9 +67,6 @@ /* Is 'struct dirent64' in <sys/types.h>? */ #undef HAVE_STRUCT_DIRENT64 -/* Is 'struct stat64' in <sys/stat.h>? */ -#undef HAVE_STRUCT_STAT64 - /* Should we include <sys/select.h>? */ #undef HAVE_SYS_SELECT_H @@ -82,6 +88,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + /* Is weak import available? */ #undef HAVE_WEAK_IMPORT @@ -189,6 +198,9 @@ /* Add the _ISOC99_SOURCE flag when building */ #undef _ISOC99_SOURCE +/* Add the _LARGEFILE64_SOURCE flag when building */ +#undef _LARGEFILE64_SOURCE + /* # needed in sys/socket.h Should OS/390 do the right thing with sockets? */ #undef _OE_SOCKETS diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 56d1797..d7e2cff 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -238,16 +238,6 @@ static unsigned RankAttributes(FontAttributes *wantPtr, static void ReleaseFont(UnixFont *fontPtr); static void ReleaseSubFont(Display *display, SubFont *subFontPtr); static int SeenName(const char *name, Tcl_DString *dsPtr); -#if TCL_MAJOR_VERSION < 9 -static int Ucs2beToUtfProc(void *clientData, const char*src, - int srcLen, int flags, Tcl_EncodingState*statePtr, - char *dst, int dstLen, int *srcReadPtr, - int *dstWrotePtr, int *dstCharsPtr); -static int UtfToUcs2beProc(void *clientData, const char*src, - int srcLen, int flags, Tcl_EncodingState*statePtr, - char *dst, int dstLen, int *srcReadPtr, - int *dstWrotePtr, int *dstCharsPtr); -#endif /* *------------------------------------------------------------------------- @@ -314,9 +304,6 @@ TkpFontPkgInit( Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); SubFont dummy; int i; -#if TCL_MAJOR_VERSION < 9 - Tcl_Encoding ucs2; -#endif if (tsdPtr->controlFamily.encoding == NULL) { @@ -337,15 +324,6 @@ TkpFontPkgInit( * if it doesn't exist yet. It is used in iso10646 fonts. */ -#if TCL_MAJOR_VERSION < 9 - ucs2 = Tcl_GetEncoding(NULL, "ucs-2be"); - if (ucs2 == NULL) { - Tcl_EncodingType ucs2type = {"ucs-2be", Ucs2beToUtfProc, UtfToUcs2beProc, NULL, NULL, 2}; - Tcl_CreateEncoding(&ucs2type); - } else { - Tcl_FreeEncoding(ucs2); - } -#endif Tcl_CreateThreadExitHandler(FontPkgCleanup, NULL); } } @@ -415,7 +393,7 @@ ControlUtfProc( result = TCL_CONVERT_NOSPACE; break; } - src += TkUtfToUniChar(src, &ch); + src += Tcl_UtfToUniChar(src, &ch); dst[0] = '\\'; if (((size_t)ch < sizeof(mapChars)) && (mapChars[ch] != 0)) { dst[1] = mapChars[ch]; @@ -449,202 +427,6 @@ ControlUtfProc( } /* - *------------------------------------------------------------------------- - * - * Ucs2beToUtfProc -- - * - * Convert from UCS-2BE (big-endian 16-bit Unicode) to UTF-8. - * - * Results: - * Returns TCL_OK if conversion was successful. - * - * Side effects: - * None. - * - *------------------------------------------------------------------------- - */ - -#if TCL_MAJOR_VERSION < 9 -static int -Ucs2beToUtfProc( - TCL_UNUSED(void *), /* Not used. */ - const char *src, /* Source string in Unicode. */ - int srcLen, /* Source string length in bytes. */ - int flags, /* Conversion control flags. */ - TCL_UNUSED(Tcl_EncodingState *),/* Place for conversion routine to store state - * information used during a piecewise - * conversion. Contents of statePtr are - * initialized and/or reset by conversion - * routine under control of flags argument. */ - char *dst, /* Output buffer in which converted string is - * stored. */ - int dstLen, /* The maximum length of output buffer in - * bytes. */ - int *srcReadPtr, /* Filled with the number of bytes from the - * source string that were converted. This may - * be less than the original source length if - * there was a problem converting some source - * characters. */ - int *dstWrotePtr, /* Filled with the number of bytes that were - * stored in the output buffer as a result of - * the conversion. */ - int *dstCharsPtr) /* Filled with the number of characters that - * correspond to the bytes stored in the - * output buffer. */ -{ - const char *srcStart, *srcEnd; - const char *dstEnd, *dstStart; - int result, numChars, charLimit = INT_MAX; - unsigned short ch; - - if (flags & TCL_ENCODING_CHAR_LIMIT) { - charLimit = *dstCharsPtr; - } - result = TCL_OK; - - /* check alignment with ucs-2 (2 == sizeof(UCS-2)) */ - if ((srcLen % 2) != 0) { - result = TCL_CONVERT_MULTIBYTE; - srcLen--; - } - /* If last code point is a high surrogate, we cannot handle that yet */ - if ((srcLen >= 2) && ((src[srcLen - 2] & 0xFC) == 0xD8)) { - result = TCL_CONVERT_MULTIBYTE; - srcLen -= 2; - } - - srcStart = src; - srcEnd = src + srcLen; - - dstStart = dst; - dstEnd = dst + dstLen - 4; - - for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) { - if (dst > dstEnd) { - result = TCL_CONVERT_NOSPACE; - break; - } - - ch = (src[0] & 0xFF) << 8 | (src[1] & 0xFF); - src += 2 /* sizeof(UTF-16) */; - - /* - * Special case for 1-byte utf chars for speed. Make sure we work with - * unsigned short-size data. - */ - if (ch && ch < 0x80) { - *dst++ = (ch & 0xFF); - } else { - dst += Tcl_UniCharToUtf(ch, dst); - } - } - - *srcReadPtr = src - srcStart; - *dstWrotePtr = dst - dstStart; - *dstCharsPtr = numChars; - return result; -} - -/* - *------------------------------------------------------------------------- - * - * UtfToUcs2beProc -- - * - * Convert from UTF-8 to UCS-2BE (fixed 2-byte encoding). - * - * Results: - * Returns TCL_OK if conversion was successful. - * - * Side effects: - * None. - * - *------------------------------------------------------------------------- - */ - -#if defined(USE_TCL_STUBS) -/* Since the UCS-2BE encoding is only used when Tk is dynamically loaded in Tcl 8.6, - * make sure that Tcl_UtfCharComplete is ALWAYS the pre-TIP #575 version, - * even though Tk is being compiled with -DTCL_NO_DEPRECATED! */ -# undef Tcl_UtfCharComplete -# define Tcl_UtfCharComplete ((int (*)(const char *, int))(void *)((&tclStubsPtr->tcl_PkgProvideEx)[326])) -#endif - -static int -UtfToUcs2beProc( - TCL_UNUSED(void *), /* TableEncodingData that specifies - * encoding. */ - const char *src, /* Source string in UTF-8. */ - int srcLen, /* Source string length in bytes. */ - int flags, /* Conversion control flags. */ - TCL_UNUSED(Tcl_EncodingState *),/* Place for conversion routine to store state - * information used during a piecewise - * conversion. Contents of statePtr are - * initialized and/or reset by conversion - * routine under control of flags argument. */ - char *dst, /* Output buffer in which converted string is - * stored. */ - int dstLen, /* The maximum length of output buffer in - * bytes. */ - int *srcReadPtr, /* Filled with the number of bytes from the - * source string that were converted. This may - * be less than the original source length if - * there was a problem converting some source - * characters. */ - int *dstWrotePtr, /* Filled with the number of bytes that were - * stored in the output buffer as a result of - * the conversion. */ - int *dstCharsPtr) /* Filled with the number of characters that - * correspond to the bytes stored in the - * output buffer. */ -{ - const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; - int result, numChars; - int ch; - - srcStart = src; - srcEnd = src + srcLen; - srcClose = srcEnd; - if (!(flags & TCL_ENCODING_END)) { - srcClose -= 6; - } - - dstStart = dst; - dstEnd = dst + dstLen - 2 /* sizeof(UCS-2) */; - - result = TCL_OK; - for (numChars = 0; src < srcEnd; numChars++) { - if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) { - /* - * If there is more string to follow, this will ensure that the - * last UTF-8 character in the source buffer hasn't been cut off. - */ - result = TCL_CONVERT_MULTIBYTE; - break; - } - if (dst > dstEnd) { - result = TCL_CONVERT_NOSPACE; - break; - } - src += TkUtfToUniChar(src, &ch); - if (ch > 0xFFFF) { - ch = 0xFFFD; - } - - /* - * Ensure big-endianness (store big bits first). - */ - - *dst++ = (char)((ch >> 8) & 0xFF); - *dst++ = (char)(ch & 0xFF); - } - *srcReadPtr = src - srcStart; - *dstWrotePtr = dst - dstStart; - *dstCharsPtr = numChars; - return result; -} -#endif - -/* *--------------------------------------------------------------------------- * * TkpGetNativeFont -- @@ -1061,11 +843,11 @@ Tk_MeasureChars( curX = 0; end = source + numBytes; for (p = source; p < end; ) { - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr); if (thisSubFontPtr != lastSubFontPtr) { familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternalDString(familyPtr->encoding, source, + (void)Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source, &runString); if (familyPtr->isTwoByteFont) { curX += XTextWidth16(lastSubFontPtr->fontStructPtr, @@ -1083,7 +865,7 @@ Tk_MeasureChars( p = next; } familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source, + (void)Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source, &runString); if (familyPtr->isTwoByteFont) { curX += XTextWidth16(lastSubFontPtr->fontStructPtr, @@ -1108,7 +890,7 @@ Tk_MeasureChars( * individually. */ - next = source + TkUtfToUniChar(source, &ch); + next = source + Tcl_UtfToUniChar(source, &ch); newX = curX = termX = 0; term = source; @@ -1143,7 +925,7 @@ Tk_MeasureChars( break; } - next += TkUtfToUniChar(next, &ch); + next += Tcl_UtfToUniChar(next, &ch); if ((ch < 256) && isspace(ch)) { if (sawNonSpace) { term = p; @@ -1168,13 +950,13 @@ Tk_MeasureChars( */ curX = newX; - p += TkUtfToUniChar(p, &ch); + p += Tcl_UtfToUniChar(p, &ch); } if ((flags & TK_AT_LEAST_ONE) && (term == source) && (p < end)) { term = p; termX = curX; if (term == source) { - term += TkUtfToUniChar(term, &ch); + term += Tcl_UtfToUniChar(term, &ch); termX = newX; } } else if ((p >= end) || !(flags & TK_WHOLE_WORDS)) { @@ -1320,7 +1102,7 @@ Tk_DrawChars( needWidth = fontPtr->font.fa.underline + fontPtr->font.fa.overstrike; for (p = source; p <= end; ) { if (p < end) { - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr); } else { next = p + 1; @@ -1332,7 +1114,7 @@ Tk_DrawChars( do_width = (needWidth || (p != end)) ? 1 : 0; familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternalDString(familyPtr->encoding, source, + (void)Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source, &runString); if (familyPtr->isTwoByteFont) { XDrawString16(display, drawable, gc, x, y, @@ -2297,8 +2079,8 @@ FontMapLoadPage( for (i = row << FONTMAP_SHIFT; i < end; i++) { int hi, lo; - if (Tcl_UtfToExternal(NULL, encoding, src, TkUniCharToUtf(i, src), - TCL_ENCODING_STOPONERROR, NULL, buf, sizeof(buf), NULL, + if (Tcl_UtfToExternal(NULL, encoding, src, Tcl_UniCharToUtf(i, src), + TCL_ENCODING_PROFILE_STRICT, NULL, buf, sizeof(buf), NULL, NULL, NULL) != TCL_OK) { continue; } @@ -2493,7 +2275,7 @@ CanUseFallback( } nameListOrig = nameList; - srcLen = TkUniCharToUtf(ch, src); + srcLen = Tcl_UniCharToUtf(ch, src); want.fa = fontPtr->font.fa; want.xa = fontPtr->xa; @@ -2572,7 +2354,7 @@ CanUseFallback( numEncodings++; } Tcl_UtfToExternal(NULL, encoding, src, srcLen, - TCL_ENCODING_STOPONERROR, NULL, dst, sizeof(dst), &srcRead, + TCL_ENCODING_PROFILE_STRICT, NULL, dst, sizeof(dst), &srcRead, &dstWrote, NULL); if (dstWrote == 0) { goto crossout; diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index c595fbb..933a690 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -196,7 +196,7 @@ TkpGetString( Tcl_DStringValue(&buf)[len] = '\0'; if (len == 1) { - len = TkUniCharToUtf((unsigned char) Tcl_DStringValue(&buf)[0], + len = Tcl_UniCharToUtf((unsigned char) Tcl_DStringValue(&buf)[0], Tcl_DStringValue(dsPtr)); Tcl_DStringSetLength(dsPtr, len); } else { diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c index 7f9ad7d..c091755 100644 --- a/unix/tkUnixMenu.c +++ b/unix/tkUnixMenu.c @@ -867,7 +867,7 @@ DrawMenuUnderline( label = Tcl_GetString(mePtr->labelPtr); start = Tcl_UtfAtIndex(label, (mePtr->underline < 0) ? mePtr->underline + len : mePtr->underline); - end = start + TkUtfToUniChar(start, &ch); + end = start + Tcl_UtfToUniChar(start, &ch); Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->activeBorderWidthPtr, &activeBorderWidth); diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h index 1cd2e8a..097c7b8 100644 --- a/unix/tkUnixPort.h +++ b/unix/tkUnixPort.h @@ -146,15 +146,6 @@ #endif /* - * These calls implement native bitmaps which are not supported under - * UNIX. The macros eliminate the calls. - */ - -#define TkpDefineNativeBitmaps() -#define TkpCreateNativeBitmap(display, source) None -#define TkpGetNativeAppBitmap(display, name, w, h) None - -/* * This macro stores a representation of the window handle in a string. * This should perhaps use the real size of an XID. */ diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 72692fc..d295a89 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -80,7 +80,7 @@ TCL_DECLARE_MUTEX(xftMutex); static int utf8ToUcs4(const char *source, FcChar32 *c, int numBytes) { if (numBytes >= 6) { - return TkUtfToUniChar(source, (int *)c); + return Tcl_UtfToUniChar(source, (int *)c); } return FcUtf8ToUcs4((const FcChar8 *)source, c, numBytes); } @@ -744,7 +744,7 @@ Tk_MeasureChars( while (numBytes > 0) { int unichar; - clen = TkUtfToUniChar(source, &unichar); + clen = Tcl_UtfToUniChar(source, &unichar); c = (FcChar32) unichar; if (clen <= 0) { diff --git a/win/Makefile.in b/win/Makefile.in index 2d3c3ea..a101ac9 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -261,7 +261,7 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ -I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" \ -${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DTCL_UTF_MAX=3 -DUSE_TCL_STUBS +${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DTCL_UTF_MAX=4 -DUSE_TCL_STUBS CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -281,7 +281,6 @@ WISH_OBJS = \ TKTEST_OBJS = \ tkSquare.$(OBJEXT) \ tkTest.$(OBJEXT) \ - tkOldTest.$(OBJEXT) \ tkWinTest.$(OBJEXT) XLIB_OBJS = \ @@ -765,9 +764,6 @@ testMain.$(OBJEXT): winMain.c tkTest.$(OBJEXT): tkTest.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) -tkOldTest.$(OBJEXT): tkOldTest.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - tkWinTest.$(OBJEXT): tkWinTest.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) @@ -1,4 +1,4 @@ -Tk 8.7 for Windows +Tk 9.0 for Windows Originally by Scott Stanton while at Sun Microsystems Labs diff --git a/win/configure b/win/configure index ba80bbb..3798e14 100755 --- a/win/configure +++ b/win/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for tk 8.7. +# Generated by GNU Autoconf 2.71 for tk 9.0. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tk' PACKAGE_TARNAME='tk' -PACKAGE_VERSION='8.7' -PACKAGE_STRING='tk 8.7' +PACKAGE_VERSION='9.0' +PACKAGE_STRING='tk 9.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tk 8.7 to adapt to many kinds of systems. +\`configure' configures tk 9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1426,7 +1426,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tk 8.7:";; + short | recursive ) echo "Configuration of tk 9.0:";; esac cat <<\_ACEOF @@ -1524,7 +1524,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tk configure 8.7 +tk configure 9.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1728,7 +1728,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tk $as_me 8.7, which was +It was created by tk $as_me 9.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2393,10 +2393,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # /bin/sh. The bash shell seems to suffer from some strange failures. SHELL=/bin/sh -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.0 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=0 +TK_PATCH_LEVEL="b1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ @@ -4037,15 +4037,10 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then +if test "${TCL_MINOR_VERSION}" -lt 7; then as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5 -fi -if test "${TCL_MINOR_VERSION}" -lt 6; then - as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5 +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.7+. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.7 or better." "$LINENO" 5 fi fi @@ -5797,11 +5792,7 @@ else fi fi -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then - eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; -else - eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ; -fi +eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names @@ -6475,7 +6466,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tk $as_me 8.7, which was +This file was extended by tk $as_me 9.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6530,7 +6521,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -tk config.status 8.7 +tk config.status 9.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/win/configure.ac b/win/configure.ac index 08e0af7..3c29be1 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. -AC_INIT([tk],[8.7]) +AC_INIT([tk],[9.0]) AC_CONFIG_SRCDIR([../generic/tk.h]) AC_PREREQ([2.69]) @@ -12,10 +12,10 @@ AC_PREREQ([2.69]) # /bin/sh. The bash shell seems to suffer from some strange failures. SHELL=/bin/sh -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.0 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=0 +TK_PATCH_LEVEL="b1" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ @@ -77,15 +77,10 @@ SC_PATH_TCLCONFIG($TK_PATCH_LEVEL) SC_LOAD_TCLCONFIG if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then +if test "${TCL_MINOR_VERSION}" -lt 7; then AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.]) -fi -if test "${TCL_MINOR_VERSION}" -lt 6; then - AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.]) +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.7+. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.7 or better.]) fi fi @@ -247,11 +242,7 @@ else fi fi -if test "${TCL_MAJOR_VERSION}" -gt 8 ; then - eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; -else - eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ; -fi +eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ; # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names diff --git a/win/makefile.vc b/win/makefile.vc index 5a5929e..a5347b1 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -153,7 +153,6 @@ TKTESTOBJS = \ $(TMP_DIR)\testMain.obj \
$(TMP_DIR)\tkSquare.obj \
$(TMP_DIR)\tkTest.obj \
- $(TMP_DIR)\tkOldTest.obj \
$(TMP_DIR)\tkWinTest.obj
XLIBOBJS = \
@@ -338,7 +337,7 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)" CONFIG_DEFS =/DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
- /DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=3 \
+ /DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=4 \
!if $(TTK_SQUARE_WIDGET)
/DTTK_SQUARE_WIDGET=1 \
!endif
@@ -623,9 +622,6 @@ $(TMP_DIR)\tkUuid.h: $(ROOT)\manifest.uuid $(TMP_DIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
$(cc32) $(appcflags_nostubs) -Fo$@ $?
-$(TMP_DIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
- $(cc32) $(appcflags_nostubs) -Fo$@ $?
-
$(TMP_DIR)\tkWinTest.obj: $(WIN_DIR)\tkWinTest.c
$(cc32) $(appcflags_nostubs) -Fo$@ $?
@@ -985,13 +985,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ #------------------------------------------------------------------------ AC_DEFUN([SC_WITH_TCL], [ - if test -d ../../tcl8.7$1/win; then - TCL_BIN_DEFAULT=../../tcl8.7$1/win + if test -d ../../tcl9.0$1/win; then + TCL_BIN_DEFAULT=../../tcl9.0$1/win else - TCL_BIN_DEFAULT=../../tcl8.7/win + TCL_BIN_DEFAULT=../../tcl9.0/win fi - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.7 binaries from DIR], + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.0 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 34bb37f..85a2249 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -846,7 +846,7 @@ Tk_MeasureChars( start = source; end = start + numBytes; for (p = start; p < end; ) { - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr); if (thisSubFontPtr != lastSubFontPtr) { familyPtr = lastSubFontPtr->familyPtr; @@ -907,7 +907,7 @@ Tk_MeasureChars( familyPtr = lastSubFontPtr->familyPtr; Tcl_DStringInit(&runString); for (p = start; p < end; ) { - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); Tcl_UtfToExternal(NULL, familyPtr->encoding, p, (int) (next - p), TCL_ENCODING_PROFILE_TCL8, NULL, buf, sizeof(buf), NULL, &dstWrote, NULL); @@ -962,7 +962,7 @@ Tk_MeasureChars( p = source; ch = ' '; while (p < end) { - next = p + TkUtfToUniChar(p, &ch2); + next = p + Tcl_UtfToUniChar(p, &ch2); if ((ch != ' ') && (ch2 == ' ')) { lastWordBreak = p; } @@ -1479,7 +1479,7 @@ MultiFontTextOut( end = source + numBytes; for (p = source; p < end; ) { - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr); /* @@ -2262,7 +2262,7 @@ FontMapLoadPage( end = (row + 1) << FONTMAP_SHIFT; for (i = row << FONTMAP_SHIFT; i < end; i++) { if (Tcl_UtfToExternal(NULL, encoding, src, - TkUniCharToUtf(i, src), TCL_ENCODING_STOPONERROR, NULL, + Tcl_UniCharToUtf(i, src), TCL_ENCODING_PROFILE_STRICT, NULL, buf, sizeof(buf), NULL, NULL, NULL) != TCL_OK) { continue; } diff --git a/win/tkWinKey.c b/win/tkWinKey.c index 5be9e0e..f2230c9 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -113,7 +113,7 @@ TkpGetString( * Special case for WM_UNICHAR and win2000 multilingual IME input */ - len = TkUniCharToUtf(keyEv->keycode, buf); + len = Tcl_UniCharToUtf(keyEv->keycode, buf); Tcl_DStringAppend(dsPtr, buf, len); } else { /* @@ -125,7 +125,7 @@ TkpGetString( if (((keysym != NoSymbol) && (keysym > 0) && (keysym < 256)) || (keysym == XK_Return) || (keysym == XK_Tab)) { - len = TkUniCharToUtf(keysym & 255, buf); + len = Tcl_UniCharToUtf(keysym & 255, buf); Tcl_DStringAppend(dsPtr, buf, len); } } diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 96b3e1c..91d80e2 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -2111,7 +2111,7 @@ DrawMenuUnderline( label = Tcl_GetString(mePtr->labelPtr); start = Tcl_UtfAtIndex(label, mePtr->underline); - end = start + TkUtfToUniChar(start, &ch); + end = start + Tcl_UtfToUniChar(start, &ch); Tk_UnderlineChars(menuPtr->display, d, gc, tkfont, label, x + mePtr->indicatorSpace, y + (height + fmPtr->ascent - fmPtr->descent) / 2, diff --git a/win/tkWinPort.h b/win/tkWinPort.h index d3471ca..fd43335 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -124,13 +124,4 @@ #define TkpGetPixel(p) (((((p)->red >> 8) & 0xff) \ | ((p)->green & 0xff00) | (((p)->blue << 8) & 0xff0000)) | 0x20000000) -/* - * These calls implement native bitmaps which are not currently - * supported under Windows. The macros eliminate the calls. - */ - -#define TkpDefineNativeBitmaps() -#define TkpCreateNativeBitmap(display, source) None -#define TkpGetNativeAppBitmap(display, name, w, h) None - #endif /* _WINPORT */ diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index 640573e..3c7bf1d 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -621,7 +621,7 @@ static void ThumbElementSize( ThumbElement *thumbPtr = (ThumbElement *)elementRecord; Ttk_Orient orient; - TtkGetOrientFromObj(NULL, thumbPtr->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, thumbPtr->orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = GetSystemMetrics(SM_CXHTHUMB); *heightPtr = GetSystemMetrics(SM_CYHSCROLL); @@ -686,7 +686,7 @@ static void SliderElementSize( SliderElement *slider = (SliderElement *)elementRecord; Ttk_Orient orient; - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = (GetSystemMetrics(SM_CXHTHUMB) / 2) | 1; *heightPtr = GetSystemMetrics(SM_CYHSCROLL); diff --git a/win/winMain.c b/win/winMain.c index 9c23037..b93e11e 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -12,6 +12,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#undef USE_TCL_STUBS #include "tk.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h index 8fd4dd3..f614e30 100644 --- a/xlib/X11/keysymdef.h +++ b/xlib/X11/keysymdef.h @@ -182,15 +182,6 @@ SOFTWARE. #define XK_Begin 0xff58 /* BOL */ -#ifndef TK_NO_DEPRECATED -/* Special Windows keyboard keys */ - -#define XK_Win_L 0xFF5B /* Left-hand Windows */ -#define XK_Win_R 0xFF5C /* Right-hand Windows */ -#define XK_App 0xFF5D /* Menu key */ -#endif - - /* Misc functions */ #define XK_Select 0xff60 /* Select, mark */ @@ -1741,18 +1732,3 @@ SOFTWARE. #define XK_braille_dot_9 0xfff9 #define XK_braille_dot_10 0xfffa #endif /* XK_BRAILLE */ - -/* Multimedia keys, defined same as on Linux - * /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h - */ - -#ifndef TK_NO_DEPRECATED -#define XK_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */ -#define XK_XF86AudioMute 0x1008FF12 /* Mute sound from the system */ -#define XK_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */ -#define XK_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */ -#define XK_XF86AudioStop 0x1008FF15 /* Stop playing audio */ -#define XK_XF86AudioPrev 0x1008FF16 /* Previous track */ -#define XK_XF86AudioNext 0x1008FF17 /* Next track */ -#endif /* !TK_NO_DEPRECATED */ - |