chore: update api
This commit is contained in:
parent
ccfdbf3fa9
commit
c5850852bd
|
@ -501,7 +501,7 @@ pub const Position = struct {
|
|||
column: usize,
|
||||
};
|
||||
|
||||
pub const RunPluginFromYaml = struct {
|
||||
pub const RunPlugin = struct {
|
||||
_allow_exec_host_cmd: ?bool,
|
||||
location: []u8,
|
||||
};
|
||||
|
@ -519,27 +519,11 @@ pub const RunCommandAction = struct {
|
|||
direction: ?Direction,
|
||||
};
|
||||
|
||||
pub const RunFromYaml = union(enum) {
|
||||
plugin: RunPluginFromYaml,
|
||||
command: RunCommand,
|
||||
};
|
||||
|
||||
pub const SplitSize = union(enum) {
|
||||
Percent: u8,
|
||||
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 {
|
||||
Up,
|
||||
Down,
|
||||
|
@ -551,11 +535,38 @@ pub const SearchOption = enum {
|
|||
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) {
|
||||
Quit,
|
||||
Write: Bytearray,
|
||||
WriteChars: []u8,
|
||||
SwitchToMode: InputMode,
|
||||
SwitchToModeForAllClients: InputMode,
|
||||
Resize: ResizeDirection,
|
||||
FocusNextPane,
|
||||
FocusPreviousPane,
|
||||
|
@ -578,12 +589,15 @@ pub const Action = union(enum) {
|
|||
TogglePaneFrames,
|
||||
ToggleActiveSyncTab,
|
||||
NewPane: ?Direction,
|
||||
EditFile: EditFileInfo,
|
||||
NewFloatingPane: ?RunCommandAction,
|
||||
NewTiledPane: NewTiledPaneInfo,
|
||||
TogglePaneEmbedOrFloating,
|
||||
ToggleFloatingPanes,
|
||||
CloseFocus,
|
||||
PaneNameInput: Bytearray,
|
||||
UndoRenamePane,
|
||||
NewTab: ?TabLayout,
|
||||
NewTab: NewTabInfo,
|
||||
NoOp,
|
||||
GoToNextTab,
|
||||
GoToPreviousTab,
|
||||
|
|
Loading…
Reference in New Issue