mod tracker;
pub use self::tracker::Tracker;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Orientation {
Unknown,
PortraitUp,
PortraitDown,
LandscapeUp,
LandscapeDown,
FaceUp,
FaceDown,
}
impl Orientation {
pub fn is_flat(self) -> bool {
match self {
Orientation::FaceUp | Orientation::FaceDown => true,
_ => false,
}
}
pub fn is_landscape(self) -> bool {
match self {
Orientation::LandscapeUp | Orientation::LandscapeDown => true,
_ => false,
}
}
pub fn is_portrait(self) -> bool {
match self {
Orientation::PortraitUp | Orientation::PortraitDown => true,
_ => false,
}
}
}