Open rubyFeedback opened 2 years ago
Thank you for opening this issue. Actually, the plan behind Glimmer DSL for GTK was to only support gtk4 originally. I ended up supporting gtk3 as a proof-of-concept just because gtk4 was not ready for prime time when I built this library. In fact, given the new gtk4 gem releases, I recently added a TODO item to upgrade Glimmer DSL for GTK to gtk4. So, I'm glad you opened this issue. I'll use it as motivation to upgrade to gtk4.
I see no value in supporting gtk3 and gtk2 going forward. Glimmer DSL for GTK will be a new gem that helps spread the new gtk4 only.
By the way, I do know kou as I made a contribution to ruby-gnome's documentation late last year that got accepted into the 3.5.0 release. In fact, both your name and my name were mentioned in the NEWS file for it: https://github.com/ruby-gnome/ruby-gnome/blob/3.5.0/NEWS
== Ruby-GNOME 3.5.0: 2021-01-11
This is a release that adds support for Ractor.
Ruby/GObjectIntrospection has some backward incompatibilities for Ractor support. If you have any problem, please report it to https://github.com/ruby-gnome/ruby-gnome/issues .
=== Changes
==== Ruby/GLib2
Improvements
Added support for Ractor.
Added support for signal handlers and virtual methods in included module.
Added support for (({try_convert})) protocol for property setter.
Added support for converting tuple (({GVariant})) to Ruby.
==== Ruby/GIO2
Improvements
Added support for GIO 2.70.
Added (({Gio::RubyInputStream})) to use Ruby objects as (({Gio::InputStream})).
Added (({Gio::RubyOutputStream})) to use Ruby objects as (({Gio::OutputStream})).
==== Ruby/GObjectIntrospection
Improvements
Added support for Ractor. This introduced some backward incompatiblities.
Added support for "transfer full" for out
GError
. [GitHub#1437][Reported by mcclumpherty]Added support for changing whether GVL is unlocked per object by the following APIs.
GObjectIntrospection::FunctionInfo#set_lock_gvl_default
GObjectIntrospection::FunctionInfo#add_lock_gvl_predicate
GObjectIntrospection::Loader#prepare_function_info_lock_gvl
Added support for converting from raw argument to enum.
Added support for (({GList
})) return value. Added support for reporting an error in callback.
Fixes
- Fixed a bug that virtual functions of grandparent class can't be implemented. [GitHub#1433][Patch by shibafu]
==== Ruby/Pango
Improvements
- Added support for Ruby 3.2.
==== Ruby/GTK3
Improvements
Improved documentation. [GitHub#1454][Patch by Andy Maleh]
Added support for Ruby 3.2.
==== Ruby/GDK4
Improvements
- Updated pkg-config ID. [GitHub#1435][Patch by Sasi Olin]
==== Ruby/GTK4
Improvements
- Removed needless rsvg2 dependency on Windows. [GitHub#1440][Reported by HuBandiT]
Fixes
- Fixed typos in warning messages. [GitHub#1442][Patch by HuBandiT] [GitHub#1415][Reported by rubyFeedback]
=== Thanks
shibafu
Sasi Olin
mcclumpherty
HuBandiT
rubyFeedback
Andy Maleh
I just installed it (via gem install gtk4) and am testing things. Hello world example works now for me; did not work for me yesterday. kou added the .so file to the gem.
I am testing the other widgets.
scrolled window I could not get to work but the others seem fine. Migration guide is a bit long so I have not yet finished.
However had, for glimmer-dsl-gtk I think it would be pretty cool if you could eventually offer a variant where users could switch between gtk2, gtk3 and gtk4 at their choosing. But this could come at a later time perhaps.
For ruby-gtk4 I think it would be interesting to see if you can run some of the examples. If you need more, (I have not written many so far, only two standalone examples), I tend to look at the python gtk4 variant. The examples often work almost 1:1.
So if you have time before your many talks coming up :D then perhaps you can run through the examples and see which ones could work, which ones could be improved e. g. via ruby-gtk4. The simpler examples I think should work fine. So this could perhaps be done.
This migration guide mentions some changes:
https://docs.gtk.org/gtk4/migrating-3to4.html
Some of them are quite big.
I tested the CSS stuff though, and I have to say that CSS is one thing I like still.
I think it would be great if we could, say, define .css in one application and re-use it across a whole different ruby-projects, not just www-related but also GUI related. That should simplify for many users working with any disparate code base (if someone wants to get glimmer to work in as many different toolkits as possible. Including SDL one day!)
Anyway that is just a long winded notification which I'll close now.
PS: By the way I am not sure kou is fully aware of glimmer. I think he probably knows indirectly via kojix2 and libui, since he gave advice to kojix2 on fiddler stuff in libui. kou is kind of an oldschool legend even if he is not that old; he maintained ruby-gtk many years ago already, I think, when mutoh or whatever was his name retired. Would be interesting to see if kou could also have some GUI-related project eventually. I am seeing kojix2 writes a lot of smaller things in libui with your help!