msink / kotlin-libui

Kotlin/Native interop to libui: a portable GUI library
MIT License
650 stars 50 forks source link

Compose POC #51

Open Dominaezzz opened 1 year ago

Dominaezzz commented 1 year ago

Starts #40 .

I've only tried this on Linux. I'm curious to see if this works on other OSes, as I can't currently test this.

Just run any of these:

I managed to support some widgets and groups however there's quite a few bits missing. I'm not sure how to pass group widget attributes from the child to the parent's applier. Stuff like isStretchy and tabLabel.

A lot of the group widgets don't map nicely to compose but there are workarounds at least.

e13mort commented 1 year ago

Great job! Any ideas how it could evolve?

Dominaezzz commented 1 year ago

Hi @e13mort, must've missed the notification. I haven't really looked at this much since I've made the PR. I'm not sure this could evolve very far tbh. libui is too rigid for Compose. Having to recreate a parent every time some component is added/removed from the composition feels kinda ridiculous.

KotlinGeekDev commented 11 months ago

Please @Dominaezzz what do you think of projects like Calf and Compose-look-and-feel? Are they ways to evolve what this PR aims to do?