mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
prepare for a merg
This commit is contained in:
parent
8f809c2a51
commit
b04e57f5a4
2 changed files with 16 additions and 13 deletions
|
|
@ -12,9 +12,20 @@ use graphics_server::Gid;
|
||||||
use heapless::Vec;
|
use heapless::Vec;
|
||||||
use heapless::consts::U32;
|
use heapless::consts::U32;
|
||||||
|
|
||||||
|
/*
|
||||||
|
what else do we need:
|
||||||
|
- current string that is being built up
|
||||||
|
- cursor position in string, so we can do insertion/deletion
|
||||||
|
*/
|
||||||
|
fn draw_canvas(gam_conn: xous::CID, canvas: Gid, pred_conn: xous::CID, newkeys: [char; 4]) {
|
||||||
|
|
||||||
fn draw_canvas(gam_conn: xous::CID, canvas: Gid, pred_conn: xous::CID) {
|
// this is just reference to remind me how to decode the key array
|
||||||
|
for &k in newkeys.iter() {
|
||||||
|
if k != '\u{0000}' {
|
||||||
|
key_queue.push(k).unwrap();
|
||||||
|
if debug1{info!("IMEF: got key '{}'", k);}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -81,16 +92,8 @@ fn xmain() -> ! {
|
||||||
};
|
};
|
||||||
} else if let Ok(opcode) = keyboard::api::Opcode::try_from(&envelope.body) {
|
} else if let Ok(opcode) = keyboard::api::Opcode::try_from(&envelope.body) {
|
||||||
match opcode {
|
match opcode {
|
||||||
|
|
||||||
//// TODO: replace the code below with something that calls the draw api
|
|
||||||
|
|
||||||
keyboard::api::Opcode::KeyboardEvent(keys) => {
|
keyboard::api::Opcode::KeyboardEvent(keys) => {
|
||||||
for &k in keys.iter() {
|
draw_canvas(gam_conn, canvas, prediction_conn, keys);
|
||||||
if k != '\u{0000}' {
|
|
||||||
key_queue.push(k).unwrap();
|
|
||||||
if debug1{info!("IMEF: got key '{}'", k);}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
_ => error!("IMEF: received KBD event opcode that wasn't expected"),
|
_ => error!("IMEF: received KBD event opcode that wasn't expected"),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ fn try_main() -> Result<(), DynError> {
|
||||||
let hw_pkgs = [
|
let hw_pkgs = [
|
||||||
"gam",
|
"gam",
|
||||||
//"shell",
|
//"shell",
|
||||||
"ime-frontend",
|
//"ime-frontend",
|
||||||
"ime-plugin-shell",
|
//"ime-plugin-shell",
|
||||||
"graphics-server",
|
"graphics-server",
|
||||||
"ticktimer-server",
|
"ticktimer-server",
|
||||||
"log-server",
|
"log-server",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue