diff options
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, +    )))) +}  | 
