-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update RGtk2 to bind Gtk3 and/or Gtk4? #12
Comments
I am curious about your use case for RGtk. Shiny made RGtk obsolete for the vast majority of use cases a decade ago. The bindings to GTK+ are auto-generated based on an obsolete scheme-based representation of the GTK+ API that was generated by the PyGTK project. By the time I started working on RGtk2, they had already moved to a different approach, but I maintained the scheme-based "defs" format manually with every GTK+ release. I'm sure there are sweeping changes between the last GTK 2.x release and GTK 4.x, so it would be a huge amount of work to update those definitions. The right way to generate GTK+ bindings these days is to use GObject Introspection. I wrote some code to parse the XML format a long time ago. However, I was blocked by an issue reported 14 years ago: there was no support for default argument values, a critical feature of RGtk2. However, I just checked the issue, and by an unbelievable coincidence, it was fixed just one month ago. While it will take some time for the API annotations to actually use that feature, one could in principle create a patch that would ideally but not necessarily be accepted upstream. Of course, there are probably many changes to GTK+ 4 and the underlying libraries like GLib and GObject that will require significant updates to the manually written code surrounding the auto-generated bindings. Quite an undertaking, but I am happy to help as I can. |
Shiny probably would work for your use case. It has a huge ecosystem of extensions and supporting packages; the web is the modern UI platform. Of course, it would mean a major rewrite of your interface code. If I find the time/energy, I will look into GTK+ 4. |
Just a note that it turns out that the default value support recently added to GIR only applies to properties, not function arguments, so it's largely useless to us. I guess if we really wanted to do this, we would patch the GIR using XSLT (via the new xslt package). And yes, it's not clear CRAN would be very receptive to the package, because it has a lot of system dependencies, is quite heavy on its own, and has a small potential user base. |
I'd like to get my retistruct package back on CRAN, complete with its GUI, which uses RGtk2, and in particular the
ggraphics()
method to embed plots. Although I like the Gtk look and feel, I'm agnostic about how this can be done. From what I can see I can't use thegWidegets2tcltk
package because Tcl/Tk can't embed graphics devices, and I'm not aware of other maintained GUI bindings for R at the moment.I'm therefore coming back to RGtk2. From my investigations in #9 and on this thread on the r-package-devel it seems that for there to be a long term future for RGtk:
Re (1), it looks like there's been some progress in the 3.x branch.
Re (2) and (3), there were some positive indications from Tomas Kalibera that it might be possible.
So I'm wondering what the future plans are for RGtk2? As a maintainer of (probably much less complex) packages, I know that a significant amount of work would be required...
The text was updated successfully, but these errors were encountered: