https://kotlinlang.org logo
Title
a

altavir

12/03/2020, 6:18 AM
It says about JavaFX interop. Did I miss something? I was waiting for it.
i

Igor Demin

12/03/2020, 7:51 AM
No, there no official interop with JavaFX. We recently fixed the issue when we cannot use simultaneously JavaFX coroutines library and Compose: https://github.com/JetBrains/compose-jb/issues/17 Probably that is what the article means by "improved interoperability with JavaFX".
👍 1
a

altavir

12/03/2020, 7:53 AM
OK then. Interop with JavaFX would be nice to have. Tornado is sadly mostly dead, but JavaFX still has a lot to offer.
m

melatonina

12/04/2020, 11:13 AM
@Igor Demin What's the path to JavaFX interoperability. What's needed to, say, visualize a Compose UI inside a JavaFX stage?
i

Igor Demin

12/04/2020, 11:25 AM
What's needed to, say, visualize a Compose UI inside a JavaFX stage
1. We need to figure out how to draw directly onto Surface which should be provided by JavaFX. And probably implement it for each desktop OS (for AWT Surface we have to write native code for each platform, for example https://github.com/JetBrains/skiko/blob/master/skiko/src/jvmMain/cpp/windows/drawlayer.cc) 2. Integrate with JavaFX event handling. For AWT we done it in https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:co[…]c/desktopMain/kotlin/androidx/compose/desktop/ComposeLayer.kt
💯 1
m

melatonina

12/04/2020, 11:26 AM
Thanks, @Igor Demin!