aboutsummaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
authordenis <denismaximov98@gmail.com>2021-01-22 08:24:56 +0200
committerdenis <denismaximov98@gmail.com>2021-01-22 08:24:56 +0200
commitbd1e3d2d7b25bf3d5f0feb77801c18e70da1c936 (patch)
treeecddbd0f4dacd009ff0868922fbc2f824258648d /src/errors.rs
parentAdd some message types for server-client comms (diff)
parentfeat(plugin): Search in root folder for plugins and layout files (diff)
downloadsl0ppij-bd1e3d2d7b25bf3d5f0feb77801c18e70da1c936.tar.gz
sl0ppij-bd1e3d2d7b25bf3d5f0feb77801c18e70da1c936.tar.xz
sl0ppij-bd1e3d2d7b25bf3d5f0feb77801c18e70da1c936.zip
Merge branch 'main' into server-client
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs
index e53bbc30..cb483bbc 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -166,6 +166,7 @@ pub enum ScreenContext {
ClearScroll,
CloseFocusedPane,
ToggleActiveTerminalFullscreen,
+ SetSelectable,
ClosePane,
ApplyLayout,
NewTab,
@@ -200,6 +201,7 @@ impl From<&ScreenInstruction> for ScreenContext {
ScreenInstruction::ToggleActiveTerminalFullscreen => {
ScreenContext::ToggleActiveTerminalFullscreen
}
+ ScreenInstruction::SetSelectable(..) => ScreenContext::SetSelectable,
ScreenInstruction::ClosePane(_) => ScreenContext::ClosePane,
ScreenInstruction::ApplyLayout(_) => ScreenContext::ApplyLayout,
ScreenInstruction::NewTab(_) => ScreenContext::NewTab,
@@ -244,6 +246,7 @@ pub enum PluginContext {
Load,
Draw,
Input,
+ GlobalInput,
Unload,
Quit,
}
@@ -254,6 +257,7 @@ impl From<&PluginInstruction> for PluginContext {
PluginInstruction::Load(..) => PluginContext::Load,
PluginInstruction::Draw(..) => PluginContext::Draw,
PluginInstruction::Input(..) => PluginContext::Input,
+ PluginInstruction::GlobalInput(_) => PluginContext::GlobalInput,
PluginInstruction::Unload(_) => PluginContext::Unload,
PluginInstruction::Quit => PluginContext::Quit,
}
@@ -262,6 +266,8 @@ impl From<&PluginInstruction> for PluginContext {
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum AppContext {
+ GetState,
+ SetState,
Exit,
Error,
}
@@ -269,6 +275,8 @@ pub enum AppContext {
impl From<&AppInstruction> for AppContext {
fn from(app_instruction: &AppInstruction) -> Self {
match *app_instruction {
+ AppInstruction::GetState(_) => AppContext::GetState,
+ AppInstruction::SetState(_) => AppContext::SetState,
AppInstruction::Exit => AppContext::Exit,
AppInstruction::Error(_) => AppContext::Error,
}