Swift Adwaita 1.1.0 has been released. I’ve been working on a first app built with this library, so I’ve extended it and fixed some bugs.
Highlights
- Added GtkSourceView integration with typed Swift wrappers for source editing, syntax highlighting, languages, and style schemes.
- Expanded widget APIs around popovers, windows, calendar compatibility, and runtime lifecycle handling.
- Improved release stability with better GLib main-loop integration, broader CI coverage, and additional regression tests.
Added
- SourceView, SourceBuffer, SourceLanguage, SourceLanguageManager, SourceStyleScheme, and SourceStyleSchemeManager.
- Typed identifiers for GtkSource languages and style schemes.
- A new source editor demo example.
- MainContext.task { ... }, task(after:), and task(every:) as cancellable GLib main-loop work handles.
- Async MainContext.run, yield, and sleep(for:) helpers for bridging Swift concurrency onto the GLib loop safely.
- Widget.unparent() and PopoverMenu.unparent().
- Convenience presentation helpers for Popover and PopoverMenu.
- Additional regression tests for widget/window parent-chain lookup and expanded coverage for source editing and media behavior.
Changed
- GtkWindow.present() now retains windows until close, making transient or locally scoped windows safer to use.
- Widget.window now resolves the containing window through the widget parent chain instead of assuming the GTK root is always a window.
- Calendar date handling now uses a GTK compatibility shim so the package builds cleanly across older and newer GTK versions.
- Documentation generation and hosted docs configuration were updated.
- CI now installs and tests with GtkSourceView 5 system dependencies.
Fixed
- Fixed deferred signal/user-data cleanup to release captured closures through the GLib main loop instead of Swift main-queue tasks, avoiding lifecycle issues in GTK applications.
- Fixed a common GTK scheduling pitfall by offering a Task-like API that stays on the GLib main loop instead of DispatchQueue.main.
- Fixed Swift 6.1 serialized suite visibility issues in the test suite.
- Fixed the popover/window regression tests to avoid GTK crash paths in CI while still validating the intended behavior.
- Fixed release documentation and installation instructions to include GtkSourceView 5 development packages.
Documentation and CI
- Added an API documentation link to the README.
- Updated installation instructions for Ubuntu/Debian and Fedora.
- Improved inline documentation consistency across the wrapper API.
- Extended CI coverage for documentation, formatting, and Swift 6.1 / 6.2 / 6.3 test runs.
This is an open-source project licensed under the MIT license. The source code is available on GitHub. Documentation with guides is available here.