We are thrilled to announce the stable release of Gtk4Tcl (v1.1.0)!
Gtk4Tcl is a modern, high-performance Tcl bridge to the GTK4 graphical toolkit. Utilizing a lightweight, lightning-fast C-FFI (Foreign Function Interface) core, it allows Tcl developers to build premium, modern, hardware-accelerated desktop applications with native GTK4 widgets, CSS theme engines, and high-performance canvas systems.
What is Gtk4Tcl?
Gtk4Tcl is designed as a modern, spiritual successor to frameworks like Gnocl, fully embracing the modern GTK4 architecture. Instead of relying on heavy compile-time wrapper libraries, Gtk4Tcl leverages libffi and Tcl's FFI capabilities to bind directly to GTK4 symbols at runtime. This yields a highly responsive UI bridge with zero bloat and absolute runtime precision.
Key Technical Features
1. Declarative Widget Layouts:
Creating modern, nested interfaces in Tcl is simple and intuitive. Gtk4Tcl widgets map to native GTK4 layouts (e.g., centerBox, flowBox, grid, paned, notebook).
package require Gtk4Tcl
::gcl::init
set win [gcl::window -title "Hello GTK4" -width 400 -height 200]
set vbox [gcl::box -orientation vertical -spacing 10]
$vbox add [gcl::label -text "Welcome to the Tcler's Wiki!"]
$vbox add [gcl::button -label "Click Me" -onClicked { puts "Hello, Tcl!" }]
$win add $vbox
$win show
::gcl::mainLoop2. Reactive MVC Data Binding:
Features automatic bi-directional binding of Tcl variables (`-variable`) to user input controls (e.g. entry, checkButton, spinButton, scale). Modifying the Tcl variable immediately updates the UI, and user changes instantly trace back to Tcl.
3. High-Performance Canvas Engine:
An advanced interactive `gcl::canvas` supporting uniform cubic B-spline curves, complex SVG-like paths (MoveTo, LineTo, CurveTo), item scaling, and real-time keyboard/mouse event controller integration.
4. Hardware-Accelerated OpenGL:
A hardened `gcl::glArea` widget with explicit pointer resolution in FFI callbacks, enabling complete 3D hierarchical modeling inside your Tcl windows without segmentation faults.
5. Embedded VTE Terminal:
Full integration with `libvte-2.91-gtk4`, allowing Tclers to easily embed interactive terminal instances (running Bash, Zsh, Midnight Commander, etc.) directly inside tabs or window panes.
6. GtkBuilder Integration:
Allows developers to seamlessly load `.ui` layout files generated by visual designers (like Cambalache or Glade) and dynamically export the active runtime widget configuration back to clean GtkBuilder XML.
7. IDE and AI Auto-completion Stubs:
Ships with `Gtk4Tcl_Stubs.tcl`, a dynamically generated, typesafe metadata file. It allows modern IDEs (VS Code, Geany) and LLMs (Gemini, Claude, GPT) to provide instant syntax highlighting, linting, and autocomplete definitions.
Availability & Download Details
Gtk4Tcl v1.1.0 is released under the **GNU General Public License v3 or later (GPLv3+).
* GitHub Repository: [L1 ](https://github.com/wjgiddings/Gtk4Tcl )
* Releases & Hosted Binaries: [L2 ](https://github.com/wjgiddings/Gtk4Tcl/releases/tag/v1.1.0 )
Under the official GitHub Release page, the following pre-compiled distribution assets are available immediately:
* .deb package: For easy install on Debian, Ubuntu, Linux Mint, and derivatives. Conforms strictly to Debian standards, including gzipped changelogs (/usr/share/doc/gtk4tcl/changelog.Debian.gz) and copyright files.
* Source bundle (.tar.bz2): Standard source code tarball.
* Docs & Dashboard Bundle (.zip): Contains all HTML documentation pages and the interactive dashboard suite.
We Want Your Feedback! This is a community-driven project, and we would love to hear from Tclers around the world!
How to test Gtk4Tcl:
1. Download and install the .deb package or compile from source. 2. Launch the interactive test dashboard:
bash tclsh Gtk4Tcl_Dashboard.tcl
3. Explore the extensive demonstrations for canvas, games (Asteroids, Breakout, Pong), OpenGL 3D widgets, and terminal controls.
Where to share feedback:
* General Discussions: Open a thread in our GitHub Discussions tab.
* Bug Reports & Feature Requests: Submit an issue on our GitHub Issues board.
* Wiki Edits: Feel free to leave comments or document your experiences right here on this Wiki page!