Add libinput documentation

This commit is contained in:
Drakulix 2017-04-15 22:53:09 +02:00
parent 4afad6f939
commit f95faba80f
1 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,10 @@ struct SeatDesc {
pointer: (u32, u32), pointer: (u32, u32),
} }
/// Libinput based `InputBackend`.
///
/// Tracks input of all devices given manually or via a udev seat to a provided libinput
/// context.
pub struct LibinputInputBackend { pub struct LibinputInputBackend {
context: Libinput, context: Libinput,
devices: Vec<Device>, devices: Vec<Device>,
@ -23,6 +27,8 @@ pub struct LibinputInputBackend {
} }
impl LibinputInputBackend { impl LibinputInputBackend {
/// Initialize a new `LibinputInputBackend` from a given already initialized libinput
/// context.
pub fn new<L>(context: Libinput, logger: L) -> Self pub fn new<L>(context: Libinput, logger: L) -> Self
where L: Into<Option<::slog::Logger>> where L: Into<Option<::slog::Logger>>
{ {