layer_shika_composition/
shell_runtime.rs1use layer_shika_adapters::platform::slint_interpreter::ComponentInstance;
2
3pub const DEFAULT_SURFACE_NAME: &str = "main";
5
6pub trait ShellRuntime {
8 type LoopHandle;
9 type Context<'a>;
10
11 fn event_loop_handle(&self) -> Self::LoopHandle;
12
13 fn with_component<F>(&self, name: &str, f: F)
14 where
15 F: FnMut(&ComponentInstance);
16
17 fn with_all_components<F>(&self, f: F)
18 where
19 F: FnMut(&str, &ComponentInstance);
20
21 fn run(&mut self) -> crate::Result<()>;
22}