introduce window::spawn and window::close

This commit is contained in:
Richard 2022-10-19 23:33:20 -03:00 committed by bungoboingo
parent 1bc0c480f9
commit f93fa02543
5 changed files with 123 additions and 71 deletions

View file

@ -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,