A new GUI Vista sample called KPad has been added:...
# gui
m
A new GUI Vista sample called KPad has been added: https://gitlab.com/gui-vista/samples/kpad Slack Conversation
👍 1
m
It would be nice if gui-vista could take some ideas from https://github.com/kropp/kotlin-native-gtk for DSL builder and events/signals
I haven't closely compared the two however
Good to see some activity on a native GUI
m
@Marshall yeah definitely! I tried to compile the examples, but on my Fedora it wasn't compile because I have gtk3 header file in another directory in compare to Debian like distros. This is actually also a good question how to solve this problem. Usually you can run the
pkg-config
(see https://developer.gnome.org/gtk3/stable/gtk-compiling.html). What do you think @napperley? Do you want help with that what @Marshall says?
m
yeah I had to make a few changes to get the kotlin-native-gtk working, I also used a forked version that had some updates, too bad its not being maintained
n
Been looking at event handling done by the kotlin-native-gtk library, and found it falls into a common trap ( https://github.com/kropp/kotlin-native-gtk/blob/master/gtk3/src/linuxX64Main/kotlin/signals.kt#L17 ) that many libraries fall into. Creating a StableRef, and assuming that it doesn't need to be closed/freed (via the dispose function - https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/-stable-ref/dispose.html ). This leads to memory leaks which can cause software to crash (eg segfault). Under Kotlin Native's current memory model it isn't possible for a library to automatically manage StableRef's for event handlers, hence wrapping event handlers doesn't work. Hopefully Kotlin Native's new memory model will fix this problem.
Would like to make significant changes (improvements) to event handling with GUI Vista, but Kotlin Native's current memory model prevents changes from being made.
Kotlin Native has a very limited memory leak checker which can detect some issues like StableRef's that haven't been disposed of.