1
0
Fork 0
forked from wry/wry

autocommit 2022-04-01 01:44:10 CEST

This commit is contained in:
Julian Orth 2022-04-01 01:44:10 +02:00
parent ab4ac883ee
commit 2dd433aa04
32 changed files with 626 additions and 139 deletions

36
src/backends/dummy.rs Normal file
View file

@ -0,0 +1,36 @@
use crate::backend::{Backend, Output, OutputId};
use std::rc::Rc;
pub struct DummyBackend {}
impl Backend for DummyBackend {
fn switch_to(&self, vtnr: u32) {
let _ = vtnr;
}
}
pub struct DummyOutput {
pub id: OutputId,
}
impl Output for DummyOutput {
fn id(&self) -> OutputId {
self.id
}
fn removed(&self) -> bool {
false
}
fn width(&self) -> i32 {
100
}
fn height(&self) -> i32 {
100
}
fn on_change(&self, _cb: Rc<dyn Fn()>) {
// nothing
}
}