add process and task managers
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

This commit is contained in:
2026-05-14 17:39:55 +01:00
parent 6694bd2dd1
commit be684ab0f9
32 changed files with 816 additions and 93 deletions
@@ -1,5 +1,5 @@
use crate::programs::prometeu_hub::window_manager::WindowManager;
use crate::{CrashReport, VirtualMachineRuntime};
use crate::{CrashReport, SystemOS};
use prometeu_hal::color::Color;
use prometeu_hal::log::{LogLevel, LogSource};
use prometeu_hal::window::Rect;
@@ -31,34 +31,34 @@ impl PrometeuHub {
// Initializes the Window System and lists apps
}
pub fn gui_update(&mut self, os: &mut VirtualMachineRuntime, hw: &mut dyn HardwareBridge) {
pub fn gui_update(&mut self, os: &mut SystemOS, hw: &mut dyn HardwareBridge) {
hw.gfx_mut().clear(Color::BLACK);
let mut next_window = None;
if hw.pad().a().pressed {
os.log(LogLevel::Debug, LogSource::Hub, 0, "window A opened".to_string());
os.vm_runtime.log(LogLevel::Debug, LogSource::Hub, 0, "window A opened".to_string());
next_window = Some((
"Green Window".to_string(),
Rect { x: 0, y: 0, w: 160, h: 90 },
Color::GREEN,
));
} else if hw.pad().b().pressed {
os.log(LogLevel::Debug, LogSource::Hub, 0, "window B opened".to_string());
os.vm_runtime.log(LogLevel::Debug, LogSource::Hub, 0, "window B opened".to_string());
next_window = Some((
"Indigo Window".to_string(),
Rect { x: 160, y: 0, w: 160, h: 90 },
Color::INDIGO,
));
} else if hw.pad().x().pressed {
os.log(LogLevel::Debug, LogSource::Hub, 0, "window X opened".to_string());
os.vm_runtime.log(LogLevel::Debug, LogSource::Hub, 0, "window X opened".to_string());
next_window = Some((
"Yellow Window".to_string(),
Rect { x: 0, y: 90, w: 160, h: 90 },
Color::YELLOW,
));
} else if hw.pad().y().pressed {
os.log(LogLevel::Debug, LogSource::Hub, 0, "window Y opened".to_string());
os.vm_runtime.log(LogLevel::Debug, LogSource::Hub, 0, "window Y opened".to_string());
next_window =
Some(("Red Window".to_string(), Rect { x: 160, y: 90, w: 160, h: 90 }, Color::RED));
}
@@ -70,7 +70,7 @@ impl PrometeuHub {
}
}
pub fn render(&mut self, _os: &mut VirtualMachineRuntime, hw: &mut dyn HardwareBridge) {
pub fn render(&mut self, _os: &mut SystemOS, hw: &mut dyn HardwareBridge) {
for window in &self.window_manager.windows {
hw.gfx_mut().fill_rect(
window.viewport.x,
@@ -84,7 +84,7 @@ impl PrometeuHub {
pub fn update_system_profile(
&mut self,
os: &mut VirtualMachineRuntime,
os: &mut SystemOS,
vm: &mut VirtualMachine,
signals: &InputSignals,
hw: &mut dyn HardwareBridge,
@@ -97,7 +97,7 @@ impl PrometeuHub {
if hw.pad().start().down {
self.window_manager.remove_window(focused_id);
} else {
crash = os.tick(vm, signals, hw);
crash = os.vm_runtime.tick(vm, signals, hw);
}
}