Introduce window::Id to timing::Stage in iced_sentinel

This commit is contained in:
Héctor Ramón Jiménez 2024-02-28 15:25:45 +01:00
parent caecbf20ef
commit 8591e5a148
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
8 changed files with 97 additions and 62 deletions

View file

@ -2,10 +2,11 @@ use std::hash::Hash;
use std::sync::atomic::{self, AtomicU64};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
/// The id of the window.
///
/// Internally Iced reserves `window::Id::MAIN` for the first window spawned.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Id(u64);
static COUNT: AtomicU64 = AtomicU64::new(1);