diff options
author | 2022-10-19 23:33:20 -0300 | |
---|---|---|
committer | 2023-01-09 11:27:04 -0800 | |
commit | f93fa0254329ebddca21ea1a79bd8ee6d8b4bdaf (patch) | |
tree | 3b3ae59caf9f67c0c5d58fb1aeb997bc91aecf99 /winit/src/window.rs | |
parent | 1bc0c480f9747826b244c30e92d8c4a29b576e4a (diff) | |
download | iced-f93fa0254329ebddca21ea1a79bd8ee6d8b4bdaf.tar.gz iced-f93fa0254329ebddca21ea1a79bd8ee6d8b4bdaf.tar.bz2 iced-f93fa0254329ebddca21ea1a79bd8ee6d8b4bdaf.zip |
introduce `window::spawn` and `window::close`
Diffstat (limited to '')
-rw-r--r-- | winit/src/window.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/winit/src/window.rs b/winit/src/window.rs index d9bc0d83..fba863ef 100644 --- a/winit/src/window.rs +++ b/winit/src/window.rs @@ -14,6 +14,22 @@ pub fn drag<Message>() -> Command<Message> { Command::single(command::Action::Window(window::Action::Drag)) } +/// TODO(derezzedex) +pub fn spawn<Message>( + id: window::Id, + settings: window::Settings, +) -> Command<Message> { + Command::single(command::Action::Window( + id, + window::Action::Spawn { settings }, + )) +} + +/// TODO(derezzedex) +pub fn close<Message>(id: window::Id) -> Command<Message> { + Command::single(command::Action::Window(id, window::Action::Close)) +} + /// Resizes the window to the given logical dimensions. pub fn resize<Message>( id: window::Id, |