Struct neko::pty::Display
[−]
pub struct Display { /* fields omitted */ }
Methods
impl Display
fn new(fd: i32) -> Result<Display, DisplayError>
The constructor method default
returns the Display
's interface
from shell.
fn from_winszed(size: Winszed) -> Display
The constructor method default
returns the Display
's interface
from shell.
fn ss(&self) -> bool
The accessor ss
returns the value of 'ss_mod'.
fn mouse(&self) -> (bool, bool, bool, bool)
The accessor mouse
returns the value of 'mouse_handle'.
fn get_window_size(&self) -> &Winszed
The accessor get_window_size
returns the window size interface.
fn set_window_size(&mut self, size: &Winszed)
The mutator set_window_size
replaces the window size.
fn get_cursor_coords(&self) -> (usize, usize)
The accessor get_cursor_coords
returns the value of 'oob', that is the coordinates of the cursor.
fn newlines(&self) -> &Vec<(usize, usize)>
The accessor newlines
returns the value of 'newline', that contains all newlines that are now
displayed on the screen.
fn into_bytes(&self) -> Vec<u8>
Converts a Vector of Character into a byte vector.
fn clear(&mut self) -> Result<usize, Error>
The method clear
purges the screen vector.
fn resize(&mut self) -> Result<(), DisplayError>
The method resize
updates the size of the output screen.
fn resize_with(&mut self, size: &Winszed)
fn tricky_resize(&mut self, begin: usize, end: usize)
The method tricky_resize
updates the size of the output screen.
fn goto(&mut self, index: usize) -> Result<usize, Error>
The method goto
moves the cursor position
fn goto_home(&mut self) -> Result<usize, Error>
The method goto_home
moves the cursor to the top left of the output screen.
fn goto_up(&mut self, mv: usize) -> Result<usize, Error>
The method goto_up
moves the cursor up.
fn goto_down(&mut self, mv: usize) -> Result<usize, Error>
The method goto_down
moves the cursor down.
fn goto_right(&mut self, mv: usize) -> Result<usize, Error>
The method goto_right
moves the cursor to its right.
fn goto_left(&mut self, mv: usize) -> Result<usize, Error>
fn goto_begin_row(&mut self)
The method goto_begin_row
moves the cursor to the beginning of the row
fn goto_end_row(&mut self)
The method goto_end_row
moves the cursor to the end of the row
fn goto_coord(&mut self, x: usize, y: usize)
The method goto_coord
moves the cursor to the given coordinates
fn scroll_down(&mut self, base: usize)
The method scroll_down
append an empty line on bottom of the screen
(the cursor doesn't move)
fn scroll_up(&mut self, base: usize)
The method scroll_up
insert an empty line on top of the screen
(the cursor doesn't move)
fn save_position(&mut self)
The method save_position
save a position in the variable 'save_position' to get
restored with self.restore_position() described right after.
If save_position() is called many times, only the newest safe will be kept.
fn restore_position(&mut self)
The method restore_position
move the cursor to coordinates safe
with self.save_position() described right before.
If no coordinates were safe, cursor moves to the top left of the output screen
fn insert_empty_line(&mut self, mv: usize)
The method insert_empty_line
insert an empty line on the right of the cursor
(the cursor doesn't move)
fn erase_right_line(&mut self, pos: usize)
The method erase_right_line
erase the current line from the cursor
to the next '\n' encountered
(char under the cursor included)
fn erase_left_line(&mut self, pos: usize)
The method erase_left_line
erase the current line from the previous '\n'
to the cursor
(char under the cursor included)
fn erase_line(&mut self, mv: usize)
The method erase_line
erase the entire current line
fn erase_up(&mut self)
The method erase_up
erase all lines from the current line up to
the top of the screen, and erase the current line from the left border
column to the cursor.
(char under the cursor included)
fn erase_down(&mut self)
The method erase_down
erase all lines from the current line down to
the bottom of the screen and erase the current line from the cursor to
the right border column
(char under the cursor included)
fn print_enter(&mut self)
The method print_enter
reproduce the behavior of a '\n'
fn print_char(&mut self, first: char, next: &[u8]) -> Result<usize, Error>
The method print_char
print an unicode character (1 to 4 chars range)
fn catch_numbers(
&self,
acc: Vec<usize>,
buf: &'a [u8]
) -> (Vec<usize>, &'a [u8])
&self,
acc: Vec<usize>,
buf: &'a [u8]
) -> (Vec<usize>, &'a [u8])
fn next_tab(&self) -> usize
The method next_tab
return the size of the current printed tabulation
fn save_terminal(&mut self)
The method save_terminal
saves the terminal Display configuration.
fn restore_terminal(&mut self)
The method restore_terminal
restore the terminal Display configuration
kept in the 'save_terminal' variable.
fn erase_chars(&mut self, mv: usize)
The method erase_chars
erases couple of chars in the current line from the cursor.
fn insert_chars(&mut self, mv: usize)
The method erase_chars
erases couple of chars in the current line from the cursor.
Trait Implementations
impl Debug for Display
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Default for Display
impl Clone for Display
fn clone(&self) -> Display
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Write for Display
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
The method write
from trait io::Write
inserts a new list of terms
from output.
fn flush(&mut self) -> Result<(), Error>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self
1.0.0
Creates a "by reference" adaptor for this instance of Write
. Read more
impl Display for Display
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more