Crate crossterm

Crate crossterm 

Source

Structs§

Attributes
a bitset for all possible attributes
KeyEvent
Represents a key event.
KeyEventState
Represents extra state about the key event.
KeyModifiers
Represents key modifiers (shift, control, alt, etc.).
MouseEvent
Represents a mouse event.

Enums§

Attribute
ClearType
Different ways to clear the terminal buffer.
Color
CursorStyle
Style of the cursor. It uses two types of escape codes, one to control blinking, and the other the shape.
Event
Represents an event.
KeyCode
Represents a key.
KeyEventKind
Represents a keyboard event kind.
KeyboardEnhancementFlags
Represents special flags that tell compatible terminals to add extra information to keyboard events.
MediaKeyCode
Represents a media key (as part of KeyCode::Media).
ModifierKeyCode
Represents a modifier key (as part of KeyCode::Modifier).
MouseButton
Represents a mouse button.
MouseEventKind
A mouse event kind.

Statics§

COLORS

Traits§

CUnwrapper

Functions§

crossterm_clear_last_error
crossterm_colors
Returns colors as a UTF-8 JSON string.
crossterm_cursor_disable_blinking
Disables blinking of the terminal cursor.
crossterm_cursor_enable_blinking
Enables blinking of the terminal cursor.
crossterm_cursor_hide
Hides the terminal cursor.
crossterm_cursor_move_down
Moves the terminal cursor a given number of rows down.
crossterm_cursor_move_left
Moves the terminal cursor a given number of cols to the left.
crossterm_cursor_move_right
Moves the terminal cursor a given number of cols to the right.
crossterm_cursor_move_to
Moves the terminal cursor to the given position (col, row).
crossterm_cursor_move_to_column
Moves the terminal cursor to the given col on the current row.
crossterm_cursor_move_to_next_line
Moves the terminal cursor down the given number of lines and moves it to the first col.
crossterm_cursor_move_to_previous_line
Moves the terminal cursor up the given number of lines and moves it to the first col.
crossterm_cursor_move_to_row
Moves the terminal cursor to the given row on the current col.
crossterm_cursor_move_up
Moves the terminal cursor a given number of rows up.
crossterm_cursor_position
Get cursor position (col, row)
crossterm_cursor_position_set
Set cursor position (col, row)
crossterm_cursor_restore_position
Restores the saved terminal cursor position.
crossterm_cursor_save_position
Saves the current terminal cursor position.
crossterm_cursor_show
Shows the terminal cursor.
crossterm_cursor_style
Sets the style of the cursor.
crossterm_cursor_style_blinking_bar
Sets the style of the cursor to a blinking bar.
crossterm_cursor_style_blinking_block
Sets the style of the cursor to a blinking block.
crossterm_cursor_style_blinking_underscore
Sets the style of the cursor to a blinking underscore.
crossterm_cursor_style_default_user_shape
Sets the style of the cursor to default user shape.
crossterm_cursor_style_steady_bar
Sets the style of the cursor to a steady bar.
crossterm_cursor_style_steady_block
Sets the style of the cursor to a steady block.
crossterm_cursor_style_steady_underscore
Sets the style of the cursor to a steady underscore.
crossterm_event_disable_bracketed_paste
Disables bracketed paste mode.
crossterm_event_disable_focus_change
Disable focus event emission.
crossterm_event_disable_mouse_capture
Disable mouse event capturing.
crossterm_event_enable_bracketed_paste
Enables bracketed paste mode.
crossterm_event_enable_focus_change
Enable focus event emission.
crossterm_event_enable_mouse_capture
Enable mouse event capturing.
crossterm_event_poll
Checks if there is an Event available.
crossterm_event_pop_keyboard_enhancement_flags
Disables extra kinds of keyboard events.
crossterm_event_push_keyboard_enhancement_flags
Enables the kitty keyboard protocol, which adds extra information to keyboard events and removes ambiguity for modifier keys. It should be paired with [crossterm_pop_keyboard_enhancement_flags] at the end of execution.
crossterm_event_read
Reads a single Event as a UTF-8 JSON string. If error occurs during read, error will be returned as a UTF-8 JSON string.
crossterm_flush
Flush the stdout stream, ensuring that all intermediately buffered contents reach their destination.
crossterm_free_c_char
Frees data behind pointer to UTF-8 string allocated by this crate
crossterm_has_error
Check whether error has been set.
crossterm_last_error_length
Calculate the number of bytes in the last error’s error message including a trailing null character. If there are no recent error, then this returns 0.
crossterm_last_error_message
Return most recent error message into a UTF-8 string buffer.
crossterm_sleep
Sleeps for n seconds where n is the argument to this function
crossterm_style_attribute
Sets an attribute.
crossterm_style_attribute_bold
Sets the Bold attribute.
crossterm_style_attribute_crossed_out
Sets the CrossedOut attribute.
crossterm_style_attribute_dim
Sets the Dim attribute.
crossterm_style_attribute_double_underlined
Sets the DoubleUnderlined attribute.
crossterm_style_attribute_fraktur
Sets the Fraktur attribute.
crossterm_style_attribute_hidden
Sets the Hidden attribute.
crossterm_style_attribute_italic
Sets the Italic attribute.
crossterm_style_attribute_no_blink
Sets the NoBlink attribute.
crossterm_style_attribute_no_bold
Sets the NoBold attribute.
crossterm_style_attribute_no_hidden
Sets the NoHidden attribute.
crossterm_style_attribute_no_italic
Sets the NoItalic attribute.
crossterm_style_attribute_no_reverse
Sets the NoReverse attribute.
crossterm_style_attribute_no_underline
Sets the NoUnderline attribute.
crossterm_style_attribute_normal_intensity
Sets the NormalIntensity attribute.
crossterm_style_attribute_not_crossed_out
Sets the NotCrossedOut attribute.
crossterm_style_attribute_rapid_blink
Sets the RapidBlink attribute.
crossterm_style_attribute_reset
Sets the Reset attribute.
crossterm_style_attribute_reverse
Sets the Reverse attribute.
crossterm_style_attribute_slow_blink
Sets the SlowBlink attribute.
crossterm_style_attribute_undercurled
Sets the Undercurled attribute.
crossterm_style_attribute_underdashed
Sets the Underdashed attribute.
crossterm_style_attribute_underdotted
Sets the Underdotted attribute.
crossterm_style_attribute_underlined
Sets the Underlined attribute.
crossterm_style_background_color
Sets the the background color.
crossterm_style_background_color_ansi
Sets the the background color to an ANSI value.
crossterm_style_background_color_black
Sets the the background color to Black.
crossterm_style_background_color_blue
Sets the the background color to Blue.
crossterm_style_background_color_cyan
Sets the the background color to Cyan.
crossterm_style_background_color_dark_blue
Sets the the background color to DarkBlue.
crossterm_style_background_color_dark_cyan
Sets the the background color to DarkCyan.
crossterm_style_background_color_dark_green
Sets the the background color to DarkGreen.
crossterm_style_background_color_dark_grey
Sets the the background color to DarkGrey.
crossterm_style_background_color_dark_magenta
Sets the the background color to DarkMagenta.
crossterm_style_background_color_dark_red
Sets the the background color to DarkRed.
crossterm_style_background_color_dark_yellow
Sets the the background color to DarkYellow.
crossterm_style_background_color_green
Sets the the background color to Green.
crossterm_style_background_color_grey
Sets the the background color to Grey.
crossterm_style_background_color_magenta
Sets the the background color to Magenta.
crossterm_style_background_color_red
Sets the the background color to Red.
crossterm_style_background_color_reset
Sets the the background color to Reset.
crossterm_style_background_color_rgb
Sets the the background color in RGB.
crossterm_style_background_color_white
Sets the the background color to White.
crossterm_style_background_color_yellow
Sets the the background color to Yellow.
crossterm_style_foreground_color
Sets the the foreground color.
crossterm_style_foreground_color_ansi
Sets the the foreground color to an ANSI value.
crossterm_style_foreground_color_black
Sets the the foreground color to Black.
crossterm_style_foreground_color_blue
Sets the the foreground color to Blue.
crossterm_style_foreground_color_cyan
Sets the the foreground color to Cyan.
crossterm_style_foreground_color_dark_blue
Sets the the foreground color to DarkBlue.
crossterm_style_foreground_color_dark_cyan
Sets the the foreground color to DarkCyan.
crossterm_style_foreground_color_dark_green
Sets the the foreground color to DarkGreen.
crossterm_style_foreground_color_dark_grey
Sets the the foreground color to DarkGrey.
crossterm_style_foreground_color_dark_magenta
Sets the the foreground color to DarkMagenta.
crossterm_style_foreground_color_dark_red
Sets the the foreground color to DarkRed.
crossterm_style_foreground_color_dark_yellow
Sets the the foreground color to DarkYellow.
crossterm_style_foreground_color_green
Sets the the foreground color to Green.
crossterm_style_foreground_color_grey
Sets the the foreground color to Grey.
crossterm_style_foreground_color_magenta
Sets the the foreground color to Magenta.
crossterm_style_foreground_color_red
Sets the the foreground color to Red.
crossterm_style_foreground_color_reset
Sets the the foreground color to Reset.
crossterm_style_foreground_color_rgb
Sets the the foreground color in RGB.
crossterm_style_foreground_color_white
Sets the the foreground color to White.
crossterm_style_foreground_color_yellow
Sets the the foreground color to Yellow.
crossterm_style_print
Print string to stdout
crossterm_style_print_char
Print char to stdout
crossterm_style_print_string
Print string to stdout
crossterm_style_reset_color
Resets the colors back to default.
crossterm_style_underline_color
Sets the the underline color.
crossterm_style_underline_color_ansi
Sets the the underline color to an ANSI value.
crossterm_style_underline_color_black
Sets the the underline color to Black.
crossterm_style_underline_color_blue
Sets the the underline color to Blue.
crossterm_style_underline_color_cyan
Sets the the underline color to Cyan.
crossterm_style_underline_color_dark_blue
Sets the the underline color to DarkBlue.
crossterm_style_underline_color_dark_cyan
Sets the the underline color to DarkCyan.
crossterm_style_underline_color_dark_green
Sets the the underline color to DarkGreen.
crossterm_style_underline_color_dark_grey
Sets the the underline color to DarkGrey.
crossterm_style_underline_color_dark_magenta
Sets the the underline color to DarkMagenta.
crossterm_style_underline_color_dark_red
Sets the the underline color to DarkRed.
crossterm_style_underline_color_dark_yellow
Sets the the underline color to DarkYellow.
crossterm_style_underline_color_green
Sets the the underline color to Green.
crossterm_style_underline_color_grey
Sets the the underline color to Grey.
crossterm_style_underline_color_magenta
Sets the the underline color to Magenta.
crossterm_style_underline_color_red
Sets the the underline color to Red.
crossterm_style_underline_color_reset
Sets the the underline color to Reset.
crossterm_style_underline_color_rgb
Sets the the underline color in RGB.
crossterm_style_underline_color_white
Sets the the underline color to White.
crossterm_style_underline_color_yellow
Sets the the underline color to Yellow.
crossterm_terminal_begin_synchronized_update
Instructs the terminal emulator to begin a synchronized frame.
crossterm_terminal_clear
Clear screen command.
crossterm_terminal_disable_line_wrap
Disables line wrapping.
crossterm_terminal_disable_raw_mode
Disables raw mode.
crossterm_terminal_enable_line_wrap
Enables line wrapping.
crossterm_terminal_enable_raw_mode
Enables raw mode.
crossterm_terminal_end_synchronized_update
Instructs the terminal to end a synchronized frame.
crossterm_terminal_enter_alternate_screen
Enters alternate screen.
crossterm_terminal_is_raw_mode_enabled
Tells whether the raw mode is enabled.
crossterm_terminal_leave_alternate_screen
Leaves alternate screen.
crossterm_terminal_ring_bell
Instructs the terminal to send a bell.
crossterm_terminal_scroll_down
Scroll down command.
crossterm_terminal_scroll_up
Scroll up command.
crossterm_terminal_size
Get terminal size
crossterm_terminal_size_set
Sets the terminal buffer size (cols, rows).
crossterm_terminal_title
Sets terminal title.
crossterm_use_stderr
Use std::io::stderr() for all commands
crossterm_use_stdout
Use std::io::stdout() for all commands
error_message
Peek at the most recent error and get its error message as a Rust String.
take_last_error
Take the most recent error, clearing LAST_ERROR in the process.