public interface WindowInfo
Provides information about the Window that is hosting this compose hierarchy.
Properties
isWindowFocused
public val isWindowFocused: Boolean
Indicates whether the window hosting this compose hierarchy is in focus.
When there are multiple windows visible, either in a multi-window environment or if a popup or dialog is visible, this property can be used to determine if the current window is in focus.
keyboardModifiers
public val keyboardModifiers: PointerKeyboardModifiers
Indicates the state of keyboard modifiers (pressed or not).
containerSize
public val containerSize: IntSize
The size of the window in pixels that can used by the application in some way. Note that this may be a larger size than is available to the Compose hierarchy (if Compose does not fill the window). In addition, it may not be safe to display content using the entire window size, for example in situations where insets representing cutouts or obscuring system UI reduce the amount of available space. Even though all pixels included in this size may not be usable at any given time, it's relative stability means it is generally the correct signal to drive the overall layout structure displaying in the window.
containerDpSize
public val containerDpSize: DpSize
The size of the window represented as a DpSize that can used by the application in some way. Note that this may be a larger size than is available to the Compose hierarchy (if Compose does not fill the window). In addition, it may not be safe to display content using the entire window size, for example in situations where insets representing cutouts or obscuring system UI reduce the amount of available space. Even though all pixels included in this size may not be usable at any given time, it's relative stability means it is generally the correct signal to drive the overall layout structure displaying in the window.