chore: update api
This commit is contained in:
parent
ccfdbf3fa9
commit
c5850852bd
|
@ -501,7 +501,7 @@ pub const Position = struct {
|
||||||
column: usize,
|
column: usize,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const RunPluginFromYaml = struct {
|
pub const RunPlugin = struct {
|
||||||
_allow_exec_host_cmd: ?bool,
|
_allow_exec_host_cmd: ?bool,
|
||||||
location: []u8,
|
location: []u8,
|
||||||
};
|
};
|
||||||
|
@ -519,27 +519,11 @@ pub const RunCommandAction = struct {
|
||||||
direction: ?Direction,
|
direction: ?Direction,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const RunFromYaml = union(enum) {
|
|
||||||
plugin: RunPluginFromYaml,
|
|
||||||
command: RunCommand,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const SplitSize = union(enum) {
|
pub const SplitSize = union(enum) {
|
||||||
Percent: u8,
|
Percent: u8,
|
||||||
Fixed: usize,
|
Fixed: usize,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const TabLayout = union(enum) {
|
|
||||||
direction: ?Direction,
|
|
||||||
pane_name: ?[]u8,
|
|
||||||
borderless: ?bool,
|
|
||||||
parts: ?[]TabLayout,
|
|
||||||
split_size: ?SplitSize,
|
|
||||||
name: ?[]u8,
|
|
||||||
focus: ?bool,
|
|
||||||
run: ?RunFromYaml,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const SearchDirection = enum {
|
pub const SearchDirection = enum {
|
||||||
Up,
|
Up,
|
||||||
Down,
|
Down,
|
||||||
|
@ -551,11 +535,38 @@ pub const SearchOption = enum {
|
||||||
Wrap,
|
Wrap,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const SplitDirection = enum {
|
||||||
|
Horizontal,
|
||||||
|
Vertical,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const RunEditFileInfo = std.meta.Tuple(&.{ []u8, ?usize });
|
||||||
|
|
||||||
|
pub const Run = union(enum) {
|
||||||
|
plugin: RunPlugin,
|
||||||
|
command: RunCommand,
|
||||||
|
EditFile: RunEditFileInfo,
|
||||||
|
Cwd: []u8,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const PaneLayout = struct {
|
||||||
|
children_split_direction: SplitDirection,
|
||||||
|
name: ?[]u8,
|
||||||
|
children: []PaneLayout,
|
||||||
|
split_size: ?SplitSize,
|
||||||
|
run: ?Run,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const EditFileInfo = std.meta.Tuple(&.{ []u8, ?usize, ?Direction, bool });
|
||||||
|
pub const NewTiledPaneInfo = std.meta.Tuple(&.{ ?Direction, ?RunCommandAction });
|
||||||
|
pub const NewTabInfo = std.meta.Tuple(&.{ ?PaneLayout, ?[]u8 });
|
||||||
|
|
||||||
pub const Action = union(enum) {
|
pub const Action = union(enum) {
|
||||||
Quit,
|
Quit,
|
||||||
Write: Bytearray,
|
Write: Bytearray,
|
||||||
WriteChars: []u8,
|
WriteChars: []u8,
|
||||||
SwitchToMode: InputMode,
|
SwitchToMode: InputMode,
|
||||||
|
SwitchToModeForAllClients: InputMode,
|
||||||
Resize: ResizeDirection,
|
Resize: ResizeDirection,
|
||||||
FocusNextPane,
|
FocusNextPane,
|
||||||
FocusPreviousPane,
|
FocusPreviousPane,
|
||||||
|
@ -578,12 +589,15 @@ pub const Action = union(enum) {
|
||||||
TogglePaneFrames,
|
TogglePaneFrames,
|
||||||
ToggleActiveSyncTab,
|
ToggleActiveSyncTab,
|
||||||
NewPane: ?Direction,
|
NewPane: ?Direction,
|
||||||
|
EditFile: EditFileInfo,
|
||||||
|
NewFloatingPane: ?RunCommandAction,
|
||||||
|
NewTiledPane: NewTiledPaneInfo,
|
||||||
TogglePaneEmbedOrFloating,
|
TogglePaneEmbedOrFloating,
|
||||||
ToggleFloatingPanes,
|
ToggleFloatingPanes,
|
||||||
CloseFocus,
|
CloseFocus,
|
||||||
PaneNameInput: Bytearray,
|
PaneNameInput: Bytearray,
|
||||||
UndoRenamePane,
|
UndoRenamePane,
|
||||||
NewTab: ?TabLayout,
|
NewTab: NewTabInfo,
|
||||||
NoOp,
|
NoOp,
|
||||||
GoToNextTab,
|
GoToNextTab,
|
||||||
GoToPreviousTab,
|
GoToPreviousTab,
|
||||||
|
|
Loading…
Reference in a new issue