diff options
author | 2023-02-17 14:10:08 +0100 | |
---|---|---|
committer | 2023-02-17 14:10:08 +0100 | |
commit | c2a5f0592465c5db2d0f95fad345c0c190870654 (patch) | |
tree | 6b91e3eca2fc76a8f8e430f8020ac25abb64f470 /winit/src/window.rs | |
parent | b9b0a9a1f400483f46ec053247c435ec7739f778 (diff) | |
parent | 2c2421ae5dad9afce1058e67ae8bcabd787fa373 (diff) | |
download | iced-c2a5f0592465c5db2d0f95fad345c0c190870654.tar.gz iced-c2a5f0592465c5db2d0f95fad345c0c190870654.tar.bz2 iced-c2a5f0592465c5db2d0f95fad345c0c190870654.zip |
Merge pull request #1589 from Night-Hunter-NF/FetchWindowId
add action to get window id
Diffstat (limited to '')
-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, + )))) +} |