diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 03:14:44 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 03:15:11 +0300 |
| commit | edd08e895fc65e07e500a1fe80e88202deae6b8d (patch) | |
| tree | 4d4c9df1e94b60a97c8a6be2ffb4f930896898a8 /src/app/runtime_mutations.rs | |
| parent | 797981c7e907bc6e3050373ba150fb7a8bc651fb (diff) | |
refactor: route pane layout tui actions through runtime wrappers
Diffstat (limited to 'src/app/runtime_mutations.rs')
| -rw-r--r-- | src/app/runtime_mutations.rs | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/src/app/runtime_mutations.rs b/src/app/runtime_mutations.rs index 4a94593c..99cd3623 100644 --- a/src/app/runtime_mutations.rs +++ b/src/app/runtime_mutations.rs @@ -1,4 +1,8 @@ -use crate::api::schema::{Method, PaneTarget, TabTarget, WorkspaceTarget}; +use crate::api::schema::{ + LayoutSetSplitRatioParams, Method, PaneFocusDirectionParams, PaneRenameParams, + PaneResizeParams, PaneSplitParams, PaneSwapParams, PaneTarget, PaneZoomParams, TabTarget, + WorkspaceTarget, +}; use super::App; @@ -46,4 +50,52 @@ impl App { pub(crate) fn runtime_pane_close(&mut self, id: &'static str, pane_id: String) -> String { self.dispatch_runtime_mutation(id, Method::PaneClose(PaneTarget { pane_id })) } + + pub(crate) fn runtime_pane_rename( + &mut self, + id: &'static str, + params: PaneRenameParams, + ) -> String { + self.dispatch_runtime_mutation(id, Method::PaneRename(params)) + } + + pub(crate) fn runtime_pane_focus_direction( + &mut self, + id: &'static str, + params: PaneFocusDirectionParams, + ) -> String { + self.dispatch_runtime_mutation(id, Method::PaneFocusDirection(params)) + } + + pub(crate) fn runtime_pane_resize( + &mut self, + id: &'static str, + params: PaneResizeParams, + ) -> String { + self.dispatch_runtime_mutation(id, Method::PaneResize(params)) + } + + pub(crate) fn runtime_pane_swap(&mut self, id: &'static str, params: PaneSwapParams) -> String { + self.dispatch_runtime_mutation(id, Method::PaneSwap(params)) + } + + pub(crate) fn runtime_pane_split( + &mut self, + id: &'static str, + params: PaneSplitParams, + ) -> String { + self.dispatch_runtime_mutation(id, Method::PaneSplit(params)) + } + + pub(crate) fn runtime_pane_zoom(&mut self, id: &'static str, params: PaneZoomParams) -> String { + self.dispatch_runtime_mutation(id, Method::PaneZoom(params)) + } + + pub(crate) fn runtime_layout_set_split_ratio( + &mut self, + id: &'static str, + params: LayoutSetSplitRatioParams, + ) -> String { + self.dispatch_runtime_mutation(id, Method::LayoutSetSplitRatio(params)) + } } |
