summaryrefslogtreecommitdiffstats
path: root/winit/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/window.rs')
-rw-r--r--winit/src/window.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/winit/src/window.rs b/winit/src/window.rs
index 1e704c5b..89db3262 100644
--- a/winit/src/window.rs
+++ b/winit/src/window.rs
@@ -2,7 +2,12 @@
use crate::command::{self, Command};
use iced_native::window;
-pub use window::{Event, Mode};
+pub use window::{Event, Mode, UserAttention};
+
+/// Closes the current window and exits the application.
+pub fn close<Message>() -> Command<Message> {
+ Command::single(command::Action::Window(window::Action::Close))
+}
/// Begins dragging the window while the left mouse button is held.
pub fn drag<Message>() -> Command<Message> {