Struct nvim_gtk::shell::State[][src]

pub struct State {
    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: GridMapmouse_enabled: boolnvim: Rc<NeovimClient>cursor: Option<BlinkCursor<State>>popup_menu: PopupMenucmd_line: CmdLinesettings: Rc<RefCell<Settings>>render_state: Rc<RefCell<RenderState>>resize_request: (i64, i64)resize_timer: Rc<Cell<Option<SourceId>>>clipboard_clipboard: Clipboardclipboard_primary: Clipboardstack: Stackdrawing_area: DrawingAreatabs: Tablineim_context: IMMulticontexterror_area: ErrorAreaoptions: ShellOptionstransparency_settings: TransparencySettignsdetach_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

impl State[src]

pub fn new(settings: Rc<RefCell<Settings>>, options: ShellOptions) -> State[src]

pub fn nvim_non_blocked(&self) -> Option<NeovimRef<'_>>[src]

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<'_>>[src]

pub fn try_nvim(&self) -> Option<NeovimRef<'_>>[src]

pub fn nvim_clone(&self) -> Rc<NeovimClient>[src]

pub fn start_nvim_initialization(&self) -> bool[src]

pub fn set_detach_cb<F>(&mut self, cb: Option<F>) where
    F: FnMut() + Send + 'static, 
[src]

pub fn set_nvim_started_cb<F>(&mut self, cb: Option<F>) where
    F: FnMut() + Send + 'static, 
[src]

pub fn set_nvim_command_cb<F>(&mut self, cb: Option<F>) where
    F: FnMut(&mut State, NvimCommand) + Send + 'static, 
[src]

pub fn set_font_desc(&mut self, desc: &str)[src]

pub fn set_font_features(&mut self, font_features: String)[src]

pub fn set_line_space(&mut self, line_space: String)[src]

pub fn set_transparency(
    &mut self,
    background_alpha: f64,
    filled_alpha: f64
) -> bool
[src]

return true if transparency enabled

pub fn open_file(&self, path: &str)[src]

pub fn cd(&self, path: &str)[src]

pub fn clipboard_clipboard_set(&self, text: &str)[src]

pub fn clipboard_primary_set(&self, text: &str)[src]

fn close_popup_menu(&self)[src]

fn queue_draw_area<M: AsRef<ModelRect>>(&mut self, rect_list: &[M])[src]

fn update_dirty_glyphs(&mut self)[src]

fn im_commit(&self, ch: &str)[src]

fn calc_nvim_size(&self) -> (usize, usize)[src]

fn show_error_area(&self)[src]

fn set_im_location(&self)[src]

fn try_nvim_resize(&mut self)[src]

fn edit_paste(&self, clipboard: &str)[src]

fn edit_copy(&self, clipboard: &str)[src]

fn max_popup_width(&self) -> i32[src]

pub fn subscribe<F>(
    &self,
    key: SubscriptionKey,
    args: &[&str],
    cb: F
) -> SubscriptionHandle where
    F: Fn(Vec<String>) + 'static, 
[src]

pub fn set_autocmds(&self)[src]

pub fn notify(&self, params: Vec<Value>) -> Result<(), String>[src]

pub fn run_now(&self, handle: &SubscriptionHandle)[src]

pub fn set_font(&mut self, font_desc: String)[src]

pub fn set_font_rpc(&mut self, font_desc: &str)[src]

pub fn on_command(&mut self, command: NvimCommand)[src]

impl State[src]

pub fn grid_line(
    &mut self,
    grid: u64,
    row: u64,
    col_start: u64,
    cells: Vec<Vec<Value>>
) -> RepaintMode
[src]

pub fn grid_clear(&mut self, grid: u64) -> RepaintMode[src]

pub fn grid_destroy(&mut self, grid: u64) -> RepaintMode[src]

pub fn grid_cursor_goto(
    &mut self,
    grid: u64,
    row: u64,
    column: u64
) -> RepaintMode
[src]

pub fn grid_resize(&mut self, grid: u64, columns: u64, rows: u64) -> RepaintMode[src]

pub fn on_redraw(&mut self, mode: &RepaintMode)[src]

pub fn grid_scroll(
    &mut self,
    grid: u64,
    top: u64,
    bot: u64,
    left: u64,
    right: u64,
    rows: i64,
    cols: i64
) -> RepaintMode
[src]

pub fn hl_attr_define(
    &mut self,
    id: u64,
    rgb_attr: HashMap<String, Value>,
    _: &Value,
    info: Vec<HashMap<String, Value>>
) -> RepaintMode
[src]

pub fn default_colors_set(
    &mut self,
    fg: i64,
    bg: i64,
    sp: i64,
    cterm_fg: i64,
    cterm_bg: i64
) -> RepaintMode
[src]

fn cur_point_area(&self) -> RepaintMode[src]

pub fn on_mode_change(&mut self, mode: String, idx: u64) -> RepaintMode[src]

pub fn on_mouse(&mut self, on: bool) -> RepaintMode[src]

pub fn on_busy(&mut self, busy: bool) -> RepaintMode[src]

pub fn popupmenu_show(
    &mut self,
    menu: &[CompleteItem<'_>],
    selected: i64,
    row: u64,
    col: u64
) -> RepaintMode
[src]

pub fn popupmenu_hide(&mut self) -> RepaintMode[src]

pub fn popupmenu_select(&mut self, selected: i64) -> RepaintMode[src]

pub fn tabline_update(
    &mut self,
    selected: Tabpage,
    tabs: Vec<(Tabpage, Option<String>)>
) -> RepaintMode
[src]

pub fn option_set(&mut self, name: String, val: Value) -> RepaintMode[src]

fn set_font_from_value(&mut self, val: Value)[src]

pub fn mode_info_set(
    &mut self,
    cursor_style_enabled: bool,
    mode_infos: Vec<HashMap<String, Value>>
) -> RepaintMode
[src]

pub fn cmdline_show(
    &mut self,
    content: Vec<(u64, String)>,
    pos: u64,
    firstc: String,
    prompt: String,
    indent: u64,
    level: u64
) -> RepaintMode
[src]

pub fn cmdline_hide(&mut self, level: u64) -> RepaintMode[src]

pub fn cmdline_block_show(
    &mut self,
    content: Vec<Vec<(u64, String)>>
) -> RepaintMode
[src]

pub fn cmdline_block_append(
    &mut self,
    content: Vec<(u64, String)>
) -> RepaintMode
[src]

pub fn cmdline_block_hide(&mut self) -> RepaintMode[src]

pub fn cmdline_pos(&mut self, pos: u64, level: u64) -> RepaintMode[src]

pub fn cmdline_special_char(
    &mut self,
    c: String,
    shift: bool,
    level: u64
) -> RepaintMode
[src]

pub fn wildmenu_show(&self, items: Vec<String>) -> RepaintMode[src]

pub fn wildmenu_hide(&self) -> RepaintMode[src]

pub fn wildmenu_select(&self, selected: i64) -> RepaintMode[src]

Trait Implementations

impl CursorRedrawCb for State[src]

Auto Trait Implementations

impl !RefUnwindSafe for State

impl !Send for State

impl !Sync for State

impl Unpin for State

impl !UnwindSafe for State

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.