iced-yoda/winit/src/system.rs

15 lines
420 B
Rust
Raw Normal View History

//! Access the native system.
use crate::command::{self, Command};
2022-03-10 03:01:12 -03:00
pub use iced_native::system::*;
/// Query for available system information.
///
/// Returns `None` if not using the `sysinfo` feature flag.
pub fn information<Message>(
2022-03-10 03:01:12 -03:00
f: impl Fn(Option<Information>) -> Message + 'static,
) -> Command<Message> {
2022-03-10 03:01:12 -03:00
Command::single(command::Action::System(Action::QueryInformation(
Box::new(f),
)))
}