Clean up crate structure

This commit is contained in:
htrefil 2020-11-13 19:22:53 +01:00
parent 76ccba2fab
commit 14cb67d534
7 changed files with 8 additions and 12 deletions

View file

@ -1,11 +1,5 @@
#[cfg(target_os = "linux")]
mod device_id;
mod event;
#[cfg(target_os = "linux")]
mod glue;
#[cfg(target_os = "linux")]
mod linux;

View file

@ -1,7 +1,9 @@
mod device_id;
mod event;
mod event_manager;
mod event_reader;
mod event_writer;
mod glue;
pub use event_manager::EventManager;
pub use event_writer::EventWriter;

View file

@ -1,8 +1,8 @@
mod button;
mod key;
use crate::event::{Axis, Direction, Event, KeyKind};
use crate::glue::{self, input_event, timeval};
use crate::event::{Axis, Button, Direction, Event, Key, KeyKind};
use crate::linux::glue::{self, input_event, timeval};
impl Event {
pub(crate) fn to_raw(&self) -> Option<input_event> {

View file

@ -1,6 +1,6 @@
use crate::device_id;
use crate::event::Event;
use crate::glue::{self, libevdev, libevdev_uinput};
use crate::linux::device_id;
use crate::linux::glue::{self, libevdev, libevdev_uinput};
use std::fs::{File, OpenOptions};
use std::io::{Error, ErrorKind};
use std::mem::MaybeUninit;

View file

@ -1,6 +1,6 @@
use crate::device_id;
use crate::event::Event;
use crate::glue::{self, input_event, libevdev, libevdev_uinput};
use crate::linux::device_id;
use crate::linux::glue::{self, input_event, libevdev, libevdev_uinput};
use std::io::{Error, ErrorKind};
use std::mem::MaybeUninit;
use std::ops::RangeInclusive;