openNativeWindow

fun openNativeWindow(options: NativeWindowOptions = NativeWindowOptions(title = "Compose Native"), onCloseRequest: () -> Boolean = { true }, onOpen: (NativeWindowScope) -> Unit = {}, onEvent: (NativeWindowEvent) -> Unit = {}, onClose: () -> Unit = {}, content: @Composable NativeWindowScope.() -> Unit): AutoCloseable

Opens an independent Compose scene in the main NativeWindow event loop, without blocking it. Close the returned handle on the UI thread to dispose the scene; SDL releases its peer on the next loop turn. Window operations are available through onOpen and the content receiver. onClose runs after the scene has been disposed.