pub struct State {Show 23 fields
pub grids: GridMap,
mouse_enabled: bool,
nvim: Rc<NeovimClient>,
cursor: Option<BlinkCursor<State>>,
popup_menu: PopupMenu,
cmd_line: CmdLine,
settings: Rc<RefCell<Settings>>,
render_state: Rc<RefCell<RenderState>>,
resize_request: (i64, i64),
resize_timer: Rc<Cell<Option<SourceId>>>,
pub clipboard_clipboard: Clipboard,
pub clipboard_primary: Clipboard,
stack: Stack,
pub drawing_area: DrawingArea,
tabs: Tabline,
im_context: IMMulticontext,
error_area: ErrorArea,
options: ShellOptions,
transparency_settings: TransparencySettigns,
detach_cb: Option<Box<RefCell<dyn FnMut() + Send + 'static>>>,
nvim_started_cb: Option<Box<RefCell<dyn FnMut() + Send + 'static>>>,
command_cb: Option<Box<dyn FnMut(&mut State, NvimCommand) + Send + 'static>>,
subscriptions: RefCell<Subscriptions>,
}
Fields§
§grids: GridMap
§mouse_enabled: bool
§nvim: Rc<NeovimClient>
§cursor: Option<BlinkCursor<State>>
§cmd_line: CmdLine
§settings: Rc<RefCell<Settings>>
§render_state: Rc<RefCell<RenderState>>
§resize_request: (i64, i64)
§resize_timer: Rc<Cell<Option<SourceId>>>
§clipboard_clipboard: Clipboard
§clipboard_primary: Clipboard
§stack: Stack
§drawing_area: DrawingArea
§tabs: Tabline
§im_context: IMMulticontext
§error_area: ErrorArea
§options: ShellOptions
§transparency_settings: TransparencySettigns
§detach_cb: Option<Box<RefCell<dyn FnMut() + Send + 'static>>>
§nvim_started_cb: Option<Box<RefCell<dyn FnMut() + Send + 'static>>>
§command_cb: Option<Box<dyn FnMut(&mut State, NvimCommand) + Send + 'static>>
§subscriptions: RefCell<Subscriptions>
Implementations§
Source§impl State
impl State
pub fn new(settings: Rc<RefCell<Settings>>, options: ShellOptions) -> State
Sourcepub fn nvim_non_blocked(&self) -> Option<NeovimRef<'_>>
pub fn nvim_non_blocked(&self) -> Option<NeovimRef<'_>>
Return NeovimRef only if vim in non blocking state
Note that this call also do neovim api call get_mode
pub fn nvim(&self) -> Option<NeovimRef<'_>>
pub fn try_nvim(&self) -> Option<NeovimRef<'_>>
pub fn nvim_clone(&self) -> Rc<NeovimClient>
pub fn start_nvim_initialization(&self) -> bool
pub fn set_detach_cb<F>(&mut self, cb: Option<F>)
pub fn set_nvim_started_cb<F>(&mut self, cb: Option<F>)
pub fn set_nvim_command_cb<F>(&mut self, cb: Option<F>)
pub fn set_font_desc(&mut self, desc: &str)
pub fn set_font_features(&mut self, font_features: String)
pub fn set_line_space(&mut self, line_space: String)
Sourcepub fn set_transparency(
&mut self,
background_alpha: f64,
filled_alpha: f64,
) -> bool
pub fn set_transparency( &mut self, background_alpha: f64, filled_alpha: f64, ) -> bool
return true if transparency enabled
pub fn set_cursor_blink(&mut self, val: i32)
pub fn open_file(&self, path: &str)
pub fn cd(&self, path: &str)
pub fn clipboard_clipboard_set(&self, text: &str)
pub fn clipboard_primary_set(&self, text: &str)
fn queue_draw_area<M: AsRef<ModelRect>>(&mut self, rect_list: &[M])
fn update_dirty_glyphs(&mut self)
fn im_commit(&self, ch: &str)
fn calc_nvim_size(&self) -> (usize, usize)
fn show_error_area(&self)
fn set_im_location(&self)
fn try_nvim_resize(&mut self)
fn edit_paste(&self, clipboard: &str)
fn edit_copy(&self, clipboard: &str)
fn max_popup_width(&self) -> i32
pub fn subscribe<F>( &self, key: SubscriptionKey, args: &[&str], cb: F, ) -> SubscriptionHandle
pub fn set_autocmds(&self)
pub fn notify(&self, params: Vec<Value>) -> Result<(), String>
pub fn run_now(&self, handle: &SubscriptionHandle)
pub fn set_font(&mut self, font_desc: String)
pub fn set_font_rpc(&mut self, font_desc: &str)
pub fn on_command(&mut self, command: NvimCommand)
Source§impl State
impl State
pub fn grid_line( &mut self, grid: u64, row: u64, col_start: u64, cells: Vec<Vec<Value>>, ) -> RepaintMode
pub fn grid_clear(&mut self, grid: u64) -> RepaintMode
pub fn grid_destroy(&mut self, grid: u64) -> RepaintMode
pub fn grid_cursor_goto( &mut self, grid: u64, row: u64, column: u64, ) -> RepaintMode
pub fn grid_resize(&mut self, grid: u64, columns: u64, rows: u64) -> RepaintMode
pub fn on_redraw(&mut self, mode: &RepaintMode)
pub fn grid_scroll( &mut self, grid: u64, top: u64, bot: u64, left: u64, right: u64, rows: i64, cols: i64, ) -> RepaintMode
pub fn hl_attr_define( &mut self, id: u64, rgb_attr: HashMap<String, Value>, _: &Value, info: Vec<HashMap<String, Value>>, ) -> RepaintMode
pub fn default_colors_set( &mut self, fg: i64, bg: i64, sp: i64, cterm_fg: i64, cterm_bg: i64, ) -> RepaintMode
fn cur_point_area(&self) -> RepaintMode
pub fn on_mode_change(&mut self, mode: String, idx: u64) -> RepaintMode
pub fn on_mouse(&mut self, on: bool) -> RepaintMode
pub fn on_busy(&mut self, busy: bool) -> RepaintMode
pub fn tabline_update( &mut self, selected: Tabpage, tabs: Vec<(Tabpage, Option<String>)>, ) -> RepaintMode
pub fn option_set(&mut self, name: String, val: Value) -> RepaintMode
fn set_font_from_value(&mut self, val: Value)
pub fn mode_info_set( &mut self, cursor_style_enabled: bool, mode_infos: Vec<HashMap<String, Value>>, ) -> RepaintMode
pub fn cmdline_show( &mut self, content: Vec<(u64, String)>, pos: u64, firstc: String, prompt: String, indent: u64, level: u64, ) -> RepaintMode
pub fn cmdline_hide(&mut self, level: u64) -> RepaintMode
pub fn cmdline_block_show( &mut self, content: Vec<Vec<(u64, String)>>, ) -> RepaintMode
pub fn cmdline_block_append( &mut self, content: Vec<(u64, String)>, ) -> RepaintMode
pub fn cmdline_block_hide(&mut self) -> RepaintMode
pub fn cmdline_pos(&mut self, pos: u64, level: u64) -> RepaintMode
pub fn cmdline_special_char( &mut self, c: String, shift: bool, level: u64, ) -> RepaintMode
Trait Implementations§
Source§impl CursorRedrawCb for State
impl CursorRedrawCb for State
fn queue_redraw_cursor(&mut self)
Auto Trait Implementations§
impl !Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more