Skip to main content

SystemChrome

Struct SystemChrome 

Source
pub struct SystemChrome;
Expand description

Controls specific aspects of the operating system’s graphical interface and how it interacts with the application.

Implementations§

Source§

impl SystemChrome

Source

pub fn set_application_switcher_description( app: &App, description: &ApplicationSwitcherDescription, )

Specifies the description of the current state of the application as it pertains to the application switcher (also known as “recent tasks”).

Any part of the description that is unsupported on the current platform will be ignored.

Source

pub fn set_system_ui_overlay_style(app: &mut App, style: &SystemUiOverlayStyle)

Specifies the style to use for the system overlays (e.g. the status bar on Android or iOS, the system navigation bar on Android) that are visible (if any).

This method will schedule the embedder update to be run in a microtask. Any subsequent calls to this method during the current event loop will overwrite the pending value, such that only the last specified value takes effect.

Call this API in code whose lifecycle matches that of the desired system UI styles. For instance, to change the system UI style on a new page, consider calling when pushing/popping a new PageRoute.

If a particular style is not supported on the platform, selecting it will have no effect.

For more complex control of the system overlay styles, consider using an AnnotatedRegion widget instead of calling this method directly. That widget places a value directly into the layer tree where it can be hit-tested by the framework.

Source

pub fn handle_app_lifecycle_state_changed( app: &mut App, state: AppLifecycleState, )

Called by the binding during a transition to a new app lifecycle state.

Source

pub fn latest_style(app: &mut App) -> Option<SystemUiOverlayStyle>

The last style that was set using set_system_ui_overlay_style.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,