use crate::foundation::{NSInteger, NSUInteger};
#[derive(Copy, Clone, Debug)]
pub enum RowAnimation {
None,
Fade,
Gap,
SlideUp,
SlideDown,
SlideLeft,
SlideRight
}
impl Into<NSUInteger> for RowAnimation {
fn into(self) -> NSUInteger {
match self {
RowAnimation::None => 0x0,
RowAnimation::Fade => 0x1,
RowAnimation::Gap => 0x2,
RowAnimation::SlideUp => 0x10,
RowAnimation::SlideDown => 0x20,
RowAnimation::SlideLeft => 0x30,
RowAnimation::SlideRight => 0x40
}
}
}
#[derive(Copy, Clone, Debug)]
pub enum RowEdge {
Leading,
Trailing
}
impl Into<RowEdge> for NSInteger {
fn into(self) -> RowEdge {
match self {
0 => RowEdge::Leading,
1 => RowEdge::Trailing,
_ => {
unreachable!();
}
}
}
}