Window API
Declared by <huxerui/window.h>.
Configuration enums
Section titled “Configuration enums”WindowContentMode:SafeArea,EdgeToEdge.WindowChromeMode:System,Custom.WindowCommand:Minimize,Maximize,Restore,ToggleMaximize,Close.SystemBarContentBrightness:Automatic,Light,Dark.
Options and metrics
Section titled “Options and metrics”WindowOptions: title, initial size, content mode, chrome mode, preferred title-bar height, and caption labels.WindowCaptionLabels: localized minimize, toggle-maximize, and close labels.WindowMetrics: logical viewport, remaining safe-area insets, and optional title-bar metrics.WindowTitleBarMetrics: height, resolved left/right control reservations, and maximized state.
Modifiers
Section titled “Modifiers”SystemBarsAppearance: status/navigation backgrounds and content brightness;Default()andDescriptor().SafeAreaPadding: per-edge booleans andDescriptor(); selected edges consume only unconsumed ancestor insets.WindowDragRegion: marker descriptor for draggable custom-chrome content.
Title bar and commands
Section titled “Title bar and commands”WindowTitleBar is a variadic/collection Layout that applies drag-region and centered cross-axis behavior while reserving standard controls. UseWindow() -> WindowHandle; handle methods are Minimize, Maximize, Restore, ToggleMaximize, and Close.
Platform contract
Section titled “Platform contract”WindowOptions is read when the platform shell creates its window.
WindowMetrics is adapter-owned observable geometry expressed in logical units.
SafeAreaPadding consumes only selected insets not already consumed by an ancestor, so nested safe-area containers do not double-pad content.
WindowContentMode::SafeArea asks the root to stay within platform insets; EdgeToEdge allows drawing behind system UI.
WindowChromeMode::Custom requires application title-bar content and is meaningful on desktop backends that support custom chrome.
Window commands are requests: embedded hosts and platforms without the corresponding operation may ignore them.

