From 179ac31a1957f01b7ce023743a7cc4f9d520567d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 10 Dec 2021 02:26:34 -0500 Subject: move some stuff around --- src/action.rs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/action.rs') diff --git a/src/action.rs b/src/action.rs index 1c6f2f3..2473b35 100644 --- a/src/action.rs +++ b/src/action.rs @@ -3,13 +3,26 @@ pub enum Action { Render, ForceRedraw, Run(String), - UpdateFocus(crate::state::Focus), - UpdateScene(crate::state::Scene), + UpdateFocus(Focus), + UpdateScene(Scene), CheckUpdateScene, Resize((u16, u16)), Quit, } +#[derive(Copy, Clone, Debug)] +pub enum Focus { + Readline, + History(usize), + Scrolling(Option), +} + +#[derive(Copy, Clone, Debug)] +pub enum Scene { + Readline, + Fullscreen, +} + pub struct Reader { pending: async_std::sync::Mutex, cvar: async_std::sync::Condvar, @@ -57,8 +70,8 @@ struct Pending { render: Option<()>, force_redraw: Option<()>, run: std::collections::VecDeque, - focus: Option, - scene: Option, + focus: Option, + scene: Option, check_scene: Option<()>, size: Option<(u16, u16)>, done: bool, -- cgit v1.2.3-54-g00ecf