morning all, has anyone had any luck writing an app using GJS? (The gnome javascript stuff, lets you write GTK+ apps in javascript and shell extensions.) I got something working in a very frankenstein way, was wondering if anyone had a nicer approach
n
napperley
07/29/2019, 12:13 AM
Many of the GTK based apps written in Kotlin use the official GTK C API (via Kotlin Native), which aren't the easiest to use but will be much easier to interop with compared to the JS APIs. The C APIs unlike the JS ones don't require mapping files to be created.
napperley
07/29/2019, 12:17 AM
If your'e planning to develop GTK apps then the GTK C API will be a better choice (will require more work upfront to get started). The C API is much more mature, stable, comprehensive, and has better documentation than the JS API.
cheers Nick, I'll be starring that repo, but still wouldn't mind knowing if there is anyone who's done the nasty with the GJS stuff- my understanding is that the gnome-shell is extensively developed in javascript, so being able to jimmy kotlin in there would make me happy (only because of my zeal for kotlin)
n
napperley
07/31/2019, 10:20 PM
As far as I understand all extensions that are developed for Gnome Shell are written in JS (incl languages that transpile to JS). Many of the major GTK based applications use the official GTK C API, and JS isn't commonly used to develop these applications.