summaryrefslogtreecommitdiffstats
path: root/winit/src/system.rs
blob: 3d1b40220a3d7251f09c41e2b46fb806b9c074dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Access the native system.
use crate::command::{self, Command};
pub use iced_native::system::*;

/// Query for available system information.
///
/// Returns `None` if not using the `sysinfo` feature flag.
pub fn information<Message>(
    f: impl Fn(Option<Information>) -> Message + 'static,
) -> Command<Message> {
    Command::single(command::Action::System(Action::QueryInformation(
        Box::new(f),
    )))
}