Simplify input capture
Instead of "injecting" characters into the input stream, the input stream is now forwarded to the `musicplayer`. It has will have to decide what to do with the stream, e.g. by setting the "mode" to something that captures the input stream and acts upon it
This commit is contained in:
@@ -8,15 +8,13 @@ import musicplayer/ui/ui
|
||||
|
||||
pub fn main() -> Nil {
|
||||
let input_keys_name: Name(Key) = process.new_name("input_keys")
|
||||
let input_inject_name: Name(Key) = process.new_name("input_inject_keys")
|
||||
|
||||
input.new(input_keys_name, input_inject_name)
|
||||
input.new(input_keys_name)
|
||||
|
||||
let assert Ok(ui) = ui.new()
|
||||
let assert Ok(mpv) = mpv.new()
|
||||
|
||||
let exit = process.new_subject()
|
||||
let assert Ok(_) =
|
||||
musicplayer.new(ui, mpv, input_keys_name, input_inject_name, exit)
|
||||
let assert Ok(_) = musicplayer.new(ui, mpv, input_keys_name, exit)
|
||||
process.receive_forever(exit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user