feat(display): input routed via display server to focused app; input Subscribe; uses caps badged + Delegate
This commit is contained in:
@@ -16,7 +16,8 @@ pub struct Program {
|
||||
/// Serves an endpoint, which it finds in slot 0.
|
||||
pub serves: bool,
|
||||
pub device: Option<Device>,
|
||||
/// Earlier programs' endpoints it may call, in its next slots.
|
||||
/// Earlier programs' endpoints it may call, in its next slots; each
|
||||
/// program's copy carries its own badge, so a server can tell them apart.
|
||||
pub uses: &'static [&'static str],
|
||||
/// Takes the console over from init; everyone else prints through it.
|
||||
pub console: bool,
|
||||
@@ -51,12 +52,14 @@ const fn server(name: &'static str, file: &'static [u8], limits: Limits) -> Prog
|
||||
/// Started on every boot. The log server comes first so the rest can print.
|
||||
pub const SERVERS: &[Program] = &[
|
||||
Program { console: true, ..server("log", b"log.elf", SMALL) },
|
||||
Program { device: Some(Device::Input), ..server("input", b"input.elf", Limits { regions: 4, ..SMALL }) },
|
||||
// The input server's only client: it passes input on to the app in focus.
|
||||
Program {
|
||||
device: Some(Device::Gpu),
|
||||
uses: &["input"],
|
||||
// The framebuffer alone is ~1000 pages at 1280x800.
|
||||
..server("display", b"display.elf", Limits { pages: 1280, regions: 4, ..SMALL })
|
||||
},
|
||||
Program { device: Some(Device::Input), ..server("input", b"input.elf", Limits { regions: 4, ..SMALL }) },
|
||||
server("permis", b"permis.elf", SMALL),
|
||||
server("session", b"session.elf", SMALL),
|
||||
];
|
||||
@@ -73,6 +76,6 @@ pub const TESTS: &[Program] = &[Program {
|
||||
/// The desktop; the test image runs the SMP self-test instead.
|
||||
pub const APPS: &[Program] = &[Program {
|
||||
serves: false,
|
||||
uses: &["input", "display"],
|
||||
uses: &["display"],
|
||||
..server("snake", b"snake.elf", Limits { pages: 128, ..SMALL })
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user