From f93fa0254329ebddca21ea1a79bd8ee6d8b4bdaf Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 19 Oct 2022 23:33:20 -0300 Subject: introduce `window::spawn` and `window::close` --- winit/src/window.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'winit/src/window.rs') 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() -> Command { Command::single(command::Action::Window(window::Action::Drag)) } +/// TODO(derezzedex) +pub fn spawn( + id: window::Id, + settings: window::Settings, +) -> Command { + Command::single(command::Action::Window( + id, + window::Action::Spawn { settings }, + )) +} + +/// TODO(derezzedex) +pub fn close(id: window::Id) -> Command { + Command::single(command::Action::Window(id, window::Action::Close)) +} + /// Resizes the window to the given logical dimensions. pub fn resize( id: window::Id, -- cgit