istg if I see another extern crate
This commit is contained in:
parent
1afca4cd38
commit
62cdf806df
|
@ -7,4 +7,4 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
smithay = "0.3.0"
|
||||
lazy_static = "1.4.0"
|
||||
lazy_static = "1.4.0"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use lazy_static::lazy_static;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref LOG_FILE: Mutex<BufWriter<File>> = {
|
||||
// here we would add the code to grab the location of the log file from the config file.
|
||||
|
@ -13,4 +15,4 @@ pub fn log(entry: &str) {
|
|||
let mut log = LOG_FILE.lock().unwrap();
|
||||
log.write_all(entry.as_bytes()).unwrap();
|
||||
log.flush().unwrap();
|
||||
}
|
||||
}
|
||||
|
|
12
src/input.rs
Normal file
12
src/input.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use crate::state::*;
|
||||
use smithay::backend::input::{
|
||||
InputBackend
|
||||
};
|
||||
|
||||
impl InputBackend for Waycrab{}
|
||||
fn dispatch_new_events<F>(
|
||||
&mut self,
|
||||
callback: F) -> Result<(),InputBackend::EventError>{
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
|
||||
mod backend;
|
||||
|
||||
|
|
14
src/state.rs
Normal file
14
src/state.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
#[derive(Debug)]
|
||||
struct Waycrab {
|
||||
uptime: std::time::Instant
|
||||
}
|
||||
|
||||
impl Waycrab{
|
||||
pub fn new() -> Self
|
||||
{
|
||||
Waycrab {
|
||||
uptime: std::time::Instant::now()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue