use std::io::Error as IoError;
use filedescriptor::Error as FileDescriptorError;
use input::event::gesture::GestureSwipeEvent;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum LibinputError {
#[error("error while assigning seat to the libinput context")]
SeatError,
#[error("unknown error while dispatching libinput event")]
DispatchError(#[from] IoError),
#[error("unknown error while polling the file descriptor")]
IOError(#[from] FileDescriptorError),
}
#[derive(Error, Debug)]
pub enum ProcessorError {
#[error("unsupported finger count ({0})")]
UnsupportedFingerCount(i32),
#[error("unsupported swipe event ({:?})", .0)]
UnsupportedSwipeEvent(GestureSwipeEvent),
#[error("event displacement is below threshold ({0})")]
DisplacementBelowThreshold(f64),
}