pub enum SystemEvent {
Show 19 variants
Appear,
Disappear,
Foreground,
Background,
Inactive,
Terminate,
FocusChanged(bool),
Resize {
width: f32,
height: f32,
scale_factor: f32,
},
SafeAreaChanged(SafeAreaInsets),
OrientationChanged(ScreenOrientation),
ThemeChanged(SystemTheme),
LocaleChanged(String),
KeyboardVisibilityChanged {
visible: bool,
height: f32,
},
MemoryWarning(MemoryPressure),
LowPowerModeChanged(bool),
NetworkStatusChanged(NetworkStatus),
BackPressed,
DeepLink(String),
ClipboardChanged,
}Expand description
Unified cross-platform system and lifecycle event smoothing all 7-platform OS differences.
Variants§
Appear
Active window or routed page became visually presented.
Disappear
Active window or routed page ceased to be visually presented.
Foreground
Application returned to active foreground execution.
Background
Application moved into suspended/hidden background execution.
Inactive
Application lost active interaction status (e.g. control center, app switcher, or deactivation).
Terminate
Application is terminating gracefully.
FocusChanged(bool)
Window keyboard/input focus state changed.
Resize
Viewport logical dimensions or DPI scale factor changed.
Fields
SafeAreaChanged(SafeAreaInsets)
Safe-area insets changed (notch, Dynamic Island, system bars, Stage Manager).
OrientationChanged(ScreenOrientation)
Device or window orientation changed.
ThemeChanged(SystemTheme)
Host OS/browser light or dark theme preference changed.
LocaleChanged(String)
Host OS/browser preferred BCP-47 locale changed.
KeyboardVisibilityChanged
Soft virtual keyboard / IME visibility or covered height changed.
Fields
MemoryWarning(MemoryPressure)
Operating system signaled memory pressure.
LowPowerModeChanged(bool)
Operating system toggled battery saver / low-power mode.
NetworkStatusChanged(NetworkStatus)
Host network connectivity status changed.
BackPressed
Hardware/gesture system back navigation was triggered.
DeepLink(String)
Host OS delivered a custom-scheme or universal deep link URI.
ClipboardChanged
System clipboard content changed.
Trait Implementations§
Source§impl Clone for SystemEvent
impl Clone for SystemEvent
impl CustomEvent for SystemEvent
Marker trait enabling SystemEvent forwarding over EventBus when desired.