Window

@Composable
fun ApplicationScope.Window(onCloseRequest: () -> Unit, state: WindowState = rememberWindowState(), visible: Boolean = true, title: String = "Untitled", undecorated: Boolean = false, transparent: Boolean = false, resizable: Boolean = true, enabled: Boolean = true, focusOnShow: Boolean = true, alwaysOnTop: Boolean = false, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, options: WindowOptions = WindowOptions(), content: @Composable HostWindowScope.() -> Unit)(source)

Composes a GLFW window in the current application composition.

Parameters

onCloseRequest

called when the user requests that the native window should close. The application decides whether to remove this Window from the composition or exit entirely.

state

state used to control and observe runtime window attributes.

visible

whether the native window is visible.

title

title shown in the window decoration, when the display server provides one.

undecorated

whether to request a window without native decorations.

transparent

whether the window content framebuffer should include alpha.

resizable

whether the user can resize the window.

enabled

whether the window reacts to input events.

focusOnShow

whether the window should receive focus when shown.

alwaysOnTop

whether the window stays above other normal windows.

onPreviewKeyEvent

key event callback invoked before the event is sent to Compose content.

onKeyEvent

key event callback invoked if Compose content does not consume the event.

options

GLFW host options for this window.

content

Compose content shown inside the window.