Hello, is there any way to get the native window (...
# compose-desktop
a
Hello, is there any way to get the native window (NSWindow, X11Window, HWND ...) from a compose desktop app ? I'm working on a Webgpu binding, and that work fine with SDL2, but using it with compose could be really interessting.
🙌 1
a
It’s more a question about Java/AWT
a
Compose use JFrame under the hood ? there is no window management here ?
a
Not sure what you mean by “window management”. There is some special handling, but yes, it’s a JFrame. When you show a Window, you get a
FrameWindowScope
in which there’s a
window: ComposeWindow
property, and
ComposeWindow
subclasses
JFrame
.
a
Correct me if I'm wrong, but Compose seems to be using Skia. If I consider a platform I'm familiar with, say macOS, how does Skia access native components like NSWindow or CAMetalLayer to use the GPU API ?
a
I’m not too familiar with that part, but you can find it here: https://github.com/JetBrains/skiko
a
I Will check, thanks 🙂
a
I need to try this on Linux and Windows, but it's working on MacOS. Thanks! I'll post the GitHub project when the binding is a little more advanced.