#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EStreamMouseButton {
    Left = 1,
    Right = 2,
    Middle = 16,
    X1 = 32,
    X2 = 64,
    Unknown = 4096,
}

impl EStreamMouseButton {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Left as i32 => Some(Self::Left),
            x if x == Self::Right as i32 => Some(Self::Right),
            x if x == Self::Middle as i32 => Some(Self::Middle),
            x if x == Self::X1 as i32 => Some(Self::X1),
            x if x == Self::X2 as i32 => Some(Self::X2),
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            _ => None,
        }
    }
}
