#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(
not(all(feature = "xkb", feature = "libinput")),
allow(rustdoc::broken_intra_doc_links)
)]
mod event;
mod leds;
#[cfg(feature = "libinput")]
mod libinput_log;
#[cfg(feature = "libinput")]
mod seat;
mod repeat;
mod repeater;
#[cfg(all(test, feature = "libinput"))]
mod seat_tests;
#[cfg(test)]
mod repeat_tests;
#[cfg(test)]
mod repeater_tests;
#[cfg(feature = "xkb")]
mod keyboard;
#[cfg(all(test, feature = "xkb"))]
mod keyboard_tests;
pub use leds::Leds;
#[cfg(feature = "libinput")]
pub use input::LibinputInterface;
#[cfg(feature = "libinput")]
pub use libinput_log::LogPriority;
pub use repeat::{Repeat, RepeatConfig, Timer};
pub use repeater::KeyRepeater;
#[cfg(feature = "libinput")]
pub use seat::{Seat, SeatOptions};
pub use event::{
InputEvent, KeyEvent, PointerAbsolute, PointerAxis, PointerButton, PointerEvent, PointerMotion,
ScrollSource, Switch, SwitchEvent, TouchEvent, TouchPhase,
};
#[cfg(feature = "xkb")]
pub use keyboard::{Keyboard, KeymapNames, Modifiers};
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum InputError {
#[error("the keymap did not compile")]
Keymap,
#[error("{0}")]
Config(&'static str),
#[error("repeat timer")]
Timer(#[source] std::io::Error),
#[error("libinput could not enumerate the seat through udev: {0}")]
Seat(String),
#[error("libinput dispatch")]
Dispatch(#[source] std::io::Error),
#[error("reading {path}")]
Io {
path: std::path::PathBuf,
source: std::io::Error,
},
}