summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorLibravatar tsuza <zabaniya101@gmail.com>2024-10-16 18:17:10 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2025-01-16 11:17:00 +0000
commite3f149d9323742183e239e0958bc0d85212acf0f (patch)
treeb67a7184ac8eb0bb89e5410025a7d83d6985abf7 /core/src
parenta00f564deed291765a35311784096193dc3988b3 (diff)
downloadiced-e3f149d9323742183e239e0958bc0d85212acf0f.tar.gz
iced-e3f149d9323742183e239e0958bc0d85212acf0f.tar.bz2
iced-e3f149d9323742183e239e0958bc0d85212acf0f.zip
feat: add a window drag resize task
Diffstat (limited to 'core/src')
-rw-r--r--core/src/window.rs2
-rw-r--r--core/src/window/direction.rs27
2 files changed, 29 insertions, 0 deletions
diff --git a/core/src/window.rs b/core/src/window.rs
index a3389998..d0e741d8 100644
--- a/core/src/window.rs
+++ b/core/src/window.rs
@@ -3,6 +3,7 @@ pub mod icon;
pub mod screenshot;
pub mod settings;
+mod direction;
mod event;
mod id;
mod level;
@@ -11,6 +12,7 @@ mod position;
mod redraw_request;
mod user_attention;
+pub use direction::Direction;
pub use event::Event;
pub use icon::Icon;
pub use id::Id;
diff --git a/core/src/window/direction.rs b/core/src/window/direction.rs
new file mode 100644
index 00000000..b757961e
--- /dev/null
+++ b/core/src/window/direction.rs
@@ -0,0 +1,27 @@
+/// The cardinal directions relative to the center of a window.
+#[derive(Debug, Clone, Copy)]
+pub enum Direction {
+ /// Points to the top edge of a window.
+ North,
+
+ /// Points to the bottom edge of a window.
+ South,
+
+ /// Points to the right edge of a window.
+ East,
+
+ /// Points to the left edge of a window.
+ West,
+
+ /// Points to the top-right corner of a window.
+ NorthEast,
+
+ /// Points to the top-left corner of a window.
+ NorthWest,
+
+ /// Points to the bottom-right corner of a window.
+ SouthEast,
+
+ /// Points to the bottom-left corner of a window.
+ SouthWest,
+}