diff --git a/core/embed/rust/src/ui/model_tt/event.rs b/core/embed/rust/src/ui/model_tt/event.rs deleted file mode 100644 index 884821470b..0000000000 --- a/core/embed/rust/src/ui/model_tt/event.rs +++ /dev/null @@ -1,28 +0,0 @@ -use core::convert::TryInto; - -use crate::{error, ui::geometry::Point}; - -#[derive(Copy, Clone, PartialEq, Eq)] -pub enum TouchEvent { - /// A person has started touching the screen at given absolute coordinates. - /// `TouchMove` will usually follow, and `TouchEnd` should finish the - /// interaction. - TouchStart(Point), - /// Touch has moved into a different point on the screen. - TouchMove(Point), - /// Touch has ended at a point on the screen. - TouchEnd(Point), -} - -impl TouchEvent { - pub fn new(event: u32, x: u32, y: u32) -> Result { - let point = Point::new(x.try_into()?, y.try_into()?); - let result = match event { - 1 => Self::TouchStart(point), - 2 => Self::TouchMove(point), - 4 => Self::TouchEnd(point), - _ => return Err(error::Error::OutOfRange), - }; - Ok(result) - } -} diff --git a/core/embed/rust/src/ui/model_tt/mod.rs b/core/embed/rust/src/ui/model_tt/mod.rs index 8d508e39ca..c6eb39480c 100644 --- a/core/embed/rust/src/ui/model_tt/mod.rs +++ b/core/embed/rust/src/ui/model_tt/mod.rs @@ -1,6 +1,5 @@ pub mod component; pub mod constant; -pub mod event; pub mod theme; #[cfg(feature = "micropython")]