2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-10 13:10:54 +00:00
phetch/src/ui/action.rs
2020-01-02 12:36:59 -08:00

13 lines
676 B
Rust

use crate::ui::Key;
pub enum Action {
None, // do nothing
Open(String, String), // open(title, url)
Keypress(Key), // unknown keypress
Redraw, // redraw everything
Draw(String), // draw something on screen
Status(String), // set the "status" line to something
Prompt(String, Box<dyn FnOnce(String) -> Action>), // query string, callback on success
Error(String), // error message
}