summaryrefslogtreecommitdiffstats
path: root/native/src/window/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/window/event.rs')
-rw-r--r--native/src/window/event.rs22
1 files changed, 21 insertions, 1 deletions
diff --git a/native/src/window/event.rs b/native/src/window/event.rs
index b177141a..64f2b8d8 100644
--- a/native/src/window/event.rs
+++ b/native/src/window/event.rs
@@ -3,7 +3,15 @@ use std::path::PathBuf;
/// A window-related event.
#[derive(PartialEq, Clone, Debug)]
pub enum Event {
- /// A window was resized
+ /// A window was moved.
+ Moved {
+ /// The new logical x location of the window
+ x: i32,
+ /// The new logical y location of the window
+ y: i32,
+ },
+
+ /// A window was resized.
Resized {
/// The new width of the window (in units)
width: u32,
@@ -12,6 +20,18 @@ pub enum Event {
height: u32,
},
+ /// The user has requested for the window to close.
+ ///
+ /// Usually, you will want to terminate the execution whenever this event
+ /// occurs.
+ CloseRequested,
+
+ /// A window was focused.
+ Focused,
+
+ /// A window was unfocused.
+ Unfocused,
+
/// A file is being hovered over the window.
///
/// When the user hovers multiple files at once, this event will be emitted