summaryrefslogtreecommitdiffstats
path: root/native/src/window/id.rs
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2023-07-12 12:23:18 -0700
committerLibravatar Bingus <shankern@protonmail.com>2023-07-12 12:23:18 -0700
commit633f405f3f78bc7f82d2b2061491b0e011137451 (patch)
tree5ebfc1f45d216a5c14a90492563599e6969eab4d /native/src/window/id.rs
parent41836dd80d0534608e7aedfbf2319c540a23de1a (diff)
parent21bd51426d900e271206f314e0c915dd41065521 (diff)
downloadiced-633f405f3f78bc7f82d2b2061491b0e011137451.tar.gz
iced-633f405f3f78bc7f82d2b2061491b0e011137451.tar.bz2
iced-633f405f3f78bc7f82d2b2061491b0e011137451.zip
Merge remote-tracking branch 'origin/master' into feat/multi-window-support
# Conflicts: # Cargo.toml # core/src/window/icon.rs # core/src/window/id.rs # core/src/window/position.rs # core/src/window/settings.rs # examples/integration/src/main.rs # examples/integration_opengl/src/main.rs # glutin/src/application.rs # native/src/subscription.rs # native/src/window.rs # runtime/src/window/action.rs # src/lib.rs # src/window.rs # winit/Cargo.toml # winit/src/application.rs # winit/src/icon.rs # winit/src/settings.rs # winit/src/window.rs
Diffstat (limited to 'native/src/window/id.rs')
-rw-r--r--native/src/window/id.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/native/src/window/id.rs b/native/src/window/id.rs
deleted file mode 100644
index 0a11b1aa..00000000
--- a/native/src/window/id.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-use std::collections::hash_map::DefaultHasher;
-use std::fmt::{Display, Formatter};
-use std::hash::{Hash, Hasher};
-
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
-/// The ID of the window.
-///
-/// Internally Iced uses `window::Id::MAIN` as the first window spawned.
-pub struct Id(u64);
-
-impl Id {
- /// The reserved window ID for the primary window in an Iced application.
- pub const MAIN: Self = Id(0);
-
- /// Creates a new unique window ID.
- pub fn new(id: impl Hash) -> Id {
- let mut hasher = DefaultHasher::new();
- id.hash(&mut hasher);
-
- Id(hasher.finish())
- }
-}
-
-impl Display for Id {
- fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
- write!(f, "Id({})", self.0)
- }
-}