diff options
author | 2023-02-17 13:47:46 +0100 | |
---|---|---|
committer | 2023-02-17 13:47:46 +0100 | |
commit | 2c2421ae5dad9afce1058e67ae8bcabd787fa373 (patch) | |
tree | 6b91e3eca2fc76a8f8e430f8020ac25abb64f470 | |
parent | 9f75f01ddb7a13a3ab1cffdfa59997cb5b131f72 (diff) | |
download | iced-2c2421ae5dad9afce1058e67ae8bcabd787fa373.tar.gz iced-2c2421ae5dad9afce1058e67ae8bcabd787fa373.tar.bz2 iced-2c2421ae5dad9afce1058e67ae8bcabd787fa373.zip |
Expose `fetch_id` helper in `window` module
-rw-r--r-- | winit/src/window.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/winit/src/window.rs b/winit/src/window.rs index 3d5a765b..961562bd 100644 --- a/winit/src/window.rs +++ b/winit/src/window.rs @@ -95,3 +95,12 @@ pub fn change_always_on_top<Message>(on_top: bool) -> Command<Message> { on_top, ))) } + +/// Fetches an identifier unique to the window. +pub fn fetch_id<Message>( + f: impl FnOnce(u64) -> Message + 'static, +) -> Command<Message> { + Command::single(command::Action::Window(window::Action::FetchId(Box::new( + f, + )))) +} |