Trait crossterm::terminal::ITerminal[][src]

pub trait ITerminal {
    fn clear(&self, clear_type: ClearType);
fn terminal_size(&self) -> (u16, u16);
fn scroll_up(&self, count: i16);
fn scroll_down(&self, count: i16);
fn set_size(&self, width: i16, height: i16); }

This trait defines the actions that can be preformed with the terminal. This trait can be implemented so that an concrete implementation of the ITerminal can forfill the wishes to work on an specific platform.

For example:

This trait is implemented for WINAPI (Windows specific) and ANSI (Unix specific), so that cursor related actions can be preformed on both unix and windows systems.

Required Methods

Clear the current cursor by specifying the clear type

Get the terminal size (x,y)

Scroll n lines up in the current terminal.

Scroll n lines down in the current terminal.

Resize terminal to the given width and height.

Implementors