Skip to main content

zellij_utils/opt/rustwide/workdir/assets/prost/
api.input_mode.rs

1// This file is @generated by prost-build.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct InputModeMessage {
5    #[prost(enumeration="InputMode", tag="1")]
6    pub input_mode: i32,
7}
8#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9#[repr(i32)]
10pub enum InputMode {
11    /// / In `Normal` mode, input is always written to the terminal, except for the shortcuts leading
12    /// / to other modes
13    Normal = 0,
14    /// / In `Locked` mode, input is always written to the terminal and all shortcuts are disabled
15    /// / except the one leading back to normal mode
16    Locked = 1,
17    /// / `Resize` mode allows resizing the different existing panes.
18    Resize = 2,
19    /// / `Pane` mode allows creating and closing panes, as well as moving between them.
20    Pane = 3,
21    /// / `Tab` mode allows creating and closing tabs, as well as moving between them.
22    Tab = 4,
23    /// / `Scroll` mode allows scrolling up and down within a pane.
24    Scroll = 5,
25    /// / `EnterSearch` mode allows for typing in the needle for a search in the scroll buffer of a pane.
26    EnterSearch = 6,
27    /// / `Search` mode allows for searching a term in a pane (superset of `Scroll`).
28    Search = 7,
29    /// / `RenameTab` mode allows assigning a new name to a tab.
30    RenameTab = 8,
31    /// / `RenamePane` mode allows assigning a new name to a pane.
32    RenamePane = 9,
33    /// / `Session` mode allows detaching sessions
34    Session = 10,
35    /// / `Move` mode allows moving the different existing panes within a tab
36    Move = 11,
37    /// / `Prompt` mode allows interacting with active prompts.
38    Prompt = 12,
39    /// / `Tmux` mode allows for basic tmux keybindings functionality
40    Tmux = 13,
41}
42impl InputMode {
43    /// String value of the enum field names used in the ProtoBuf definition.
44    ///
45    /// The values are not transformed in any way and thus are considered stable
46    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
47    pub fn as_str_name(&self) -> &'static str {
48        match self {
49            InputMode::Normal => "Normal",
50            InputMode::Locked => "Locked",
51            InputMode::Resize => "Resize",
52            InputMode::Pane => "Pane",
53            InputMode::Tab => "Tab",
54            InputMode::Scroll => "Scroll",
55            InputMode::EnterSearch => "EnterSearch",
56            InputMode::Search => "Search",
57            InputMode::RenameTab => "RenameTab",
58            InputMode::RenamePane => "RenamePane",
59            InputMode::Session => "Session",
60            InputMode::Move => "Move",
61            InputMode::Prompt => "Prompt",
62            InputMode::Tmux => "Tmux",
63        }
64    }
65    /// Creates an enum from field names used in the ProtoBuf definition.
66    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
67        match value {
68            "Normal" => Some(Self::Normal),
69            "Locked" => Some(Self::Locked),
70            "Resize" => Some(Self::Resize),
71            "Pane" => Some(Self::Pane),
72            "Tab" => Some(Self::Tab),
73            "Scroll" => Some(Self::Scroll),
74            "EnterSearch" => Some(Self::EnterSearch),
75            "Search" => Some(Self::Search),
76            "RenameTab" => Some(Self::RenameTab),
77            "RenamePane" => Some(Self::RenamePane),
78            "Session" => Some(Self::Session),
79            "Move" => Some(Self::Move),
80            "Prompt" => Some(Self::Prompt),
81            "Tmux" => Some(Self::Tmux),
82            _ => None,
83        }
84    }
85}