You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal: could a .rb example file be added, to showcase event signal changes handling in ruby-gtk4? Just to show the new API that gtk4 uses here.
#1502
Open
rubyFeedback opened this issue
Sep 13, 2022
· 1 comment
Would it be possible to add examples that show the changed API?
The old events I used in ruby-gtk2 and ruby-gtk3 do not seem to work. I assume I have
to change it to Gtk::GestureClick and Gtk::EventControllerKey but I have not yet tried.
I may figure it out in the coming days. But I think it may be nice to add a widget that
could work in ruby-gtk3, and then in ruby-gtk4, to show what has changed in regards
to events.
Not all events have to be tested, but I believe the mouse-key-press event and the
keyboard-key-press event is very commonly used in application code, so it may
be nice to have just a small (really small) example, like the hello world example,
but just showcasing the event keys.
I'll try to figure it out on my own and then perhaps I will have an example that I can
add. Or perhaps someone else is faster. But I think for new users for ruby-gtk4
in particular it may be helpful to have a single .rb file that showcases a working
example of events. People can then adapt it in their own projects.
The text was updated successfully, but these errors were encountered:
Heya kou,
I am currently experimenting with ruby-gtk4 now that it works (for me at the least).
The guide here mentions what has changed:
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/docs/reference/gtk/migrating-3to4.md
Would it be possible to add examples that show the changed API?
The old events I used in ruby-gtk2 and ruby-gtk3 do not seem to work. I assume I have
to change it to Gtk::GestureClick and Gtk::EventControllerKey but I have not yet tried.
I may figure it out in the coming days. But I think it may be nice to add a widget that
could work in ruby-gtk3, and then in ruby-gtk4, to show what has changed in regards
to events.
Not all events have to be tested, but I believe the mouse-key-press event and the
keyboard-key-press event is very commonly used in application code, so it may
be nice to have just a small (really small) example, like the hello world example,
but just showcasing the event keys.
I'll try to figure it out on my own and then perhaps I will have an example that I can
add. Or perhaps someone else is faster. But I think for new users for ruby-gtk4
in particular it may be helpful to have a single .rb file that showcases a working
example of events. People can then adapt it in their own projects.
The text was updated successfully, but these errors were encountered: