Basic output system

This commit is contained in:
2024-04-22 19:57:27 -07:00
parent 082fbf3e80
commit aae336ca66
13 changed files with 959 additions and 91 deletions

35
src/device.rs Normal file
View File

@@ -0,0 +1,35 @@
use std::rc::Rc;
use crate::screen::Screen;
pub struct DeviceT {
pub screen: Screen
}
impl DeviceT {
fn new() -> Self {
let screen = Screen::new();
DeviceT {
screen
}
}
}
pub struct Device {
pub shared: Rc<DeviceT>
}
impl Device {
pub fn new() -> Self {
return Device {
shared: Rc::new(DeviceT::new())
}
}
pub fn share(&self) -> Self {
return Device {
shared: self.shared.clone()
}
}
}