aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-04-17 11:00:24 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-04-17 11:31:34 +0300
commit4a4c972ffb900951b65fb5317b62c592bbccfc44 (patch)
treed859bc4dbf1618920c147f9f6c384a759b0ee4ed
parentba933773ab1c2fb9e648676ed1797d4e67545da7 (diff)
downloadniri-4a4c972ffb900951b65fb5317b62c592bbccfc44.tar.gz
niri-4a4c972ffb900951b65fb5317b62c592bbccfc44.tar.bz2
niri-4a4c972ffb900951b65fb5317b62c592bbccfc44.zip
animation: Add more getters
-rw-r--r--src/animation/mod.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/animation/mod.rs b/src/animation/mod.rs
index b6d6b552..b2f26b32 100644
--- a/src/animation/mod.rs
+++ b/src/animation/mod.rs
@@ -295,11 +295,22 @@ impl Animation {
self.to
}
- #[cfg(test)]
pub fn from(&self) -> f64 {
self.from
}
+ pub fn start_time(&self) -> Duration {
+ self.start_time
+ }
+
+ pub fn end_time(&self) -> Duration {
+ self.start_time + self.duration
+ }
+
+ pub fn duration(&self) -> Duration {
+ self.duration
+ }
+
pub fn offset(&mut self, offset: f64) {
self.from += offset;
self.to += offset;