summaryrefslogtreecommitdiffstats
path: root/winit/src/system.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/system.rs')
-rw-r--r--winit/src/system.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/winit/src/system.rs b/winit/src/system.rs
new file mode 100644
index 00000000..cd3ba075
--- /dev/null
+++ b/winit/src/system.rs
@@ -0,0 +1,14 @@
+//! Access the native system.
+use crate::command::{self, Command};
+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<system::Information>) -> Message + 'static,
+) -> Command<Message> {
+ Command::single(command::Action::System(system::Action::QueryInformation(
+ Box::new(f),
+ )))
+}