etch/terminal
This module provides terminal associated functions like entering raw mode, alternative screen, setting title etc.
Types
Used in clear function.
pub type ClearType {
All
Purge
FromCursorDown
FromCursorUp
CurrentLine
UntilNewLine
}
Constructors
-
AllClears the whole screen.
-
PurgeClears the whole screen and the history.
-
FromCursorDownClears cells from the cursor downwards.
-
FromCursorUpClears cells from the cursor upwards.
-
CurrentLineClears cells at the current cursor row.
-
UntilNewLineClears cells from the cursor positon until the end.
Values
pub fn clear(t: ClearType) -> String
pub fn disable_line_wrap() -> String
Disable line wrap.
It is prefered not to use this directly. See DisableLineWrap.
pub fn enable_line_wrap() -> String
Enable line wrap.
It is prefered not to use this directly. See EnableLineWrap.
pub fn enter_alternative() -> String
Enter alternative screen.
It is prefered not to use this directly. See EnterAlternative.
pub fn enter_raw() -> Nil
Enters raw mode.
It is prefered not to use this directly. See EnterRaw.
pub fn leave_alternative() -> String
Leave alternative screen.
It is prefered not to use this directly. See LeaveAlternative.
pub fn scroll_down(n: Int) -> String
Scroll N rows down.
It is prefered not to use this directly. See ScrollDown.
pub fn scroll_up(n: Int) -> String
Scroll N rows up.
It is prefered not to use this directly. See ScrollUp.
pub fn set_size(x: Int, y: Int) -> String
Set window size. It does not work on most modern terminals
due to security issues.
It is prefered not to use this directly. See SetSize.
pub fn set_title(s: String) -> String
Sets terminal title.
It is prefered not to use this directly. See SetTitle.