A set of tools to make GNOME application creation easy in Kotlin Native, with Glade UI integration.
This was a work in progress for lack of a better option. Then I discovered:
- java-gi: a java gtk4 binding, which does the job, seems very complete and well maintained
- compose-4-gtk: a very nice proof of concept to use GTK components through composables I feel these are better alternatives.
- a lightweight GTK object binding: no wrapper objects, just extension functions & aliases
- a Glade UI gradle plugin: produces UI classes for type-safe widget access & glade file integration in the executable
- a sample app
Prerequisites:
sudo apt install libgtk-3-dev libtinfo5
Then in your build.gradle.kts:
repositories {
mavenCentral()
}
And:
dependencies {
implementation("org.mrlem.gnome:gtk-binding:0.2.0")
}
Next steps:
- to get started: take a look at the sample project.
- to learn more: see internals.
Still a work in progress:
- Glade gradle plugin: 100% complete
- API coverage is still incomplete:
- signal handler support is partial: no callback data
- data types is partial for some of them: bitfields, etc
- some missing generations: Cairo
- platform support: Linux only for now
Other Kotlin native GTK projects around:
- kotlin-native-gtk: low-level wrappers bindings, GIR based
- kotlinx-gtk: high-level wrappers bindings, manually created
- gir2java: GIR file java descriptors generator
For an explanation about why I didn't rely on one of them, see the FAQ.