Module prelude Copy item path Source pub use crossterm ;
pub use crate::math ::*;
pub use crate::renderer::buffer ::*;
pub use crate::renderer::cell ::*;
pub use crate::renderer::render ::*;
pub use crate::window ::*;
event A macro that allows you to quickly check an event based off of a pattern
Takes in the window, a pattern for the if let statement, and finally a closure.
This closure could be anything that returns a bool. render A macro to simplify rendering lots of items at once.
The Buffer can be anything that implements AsMut
This render will return the location of which the last element finished rendering.
Example
Attributes a bitset for all possible attributes Colors Represents, optionally, a foreground and/or a background color. ContentStyle The style that can be put on content. DisableBracketedPaste A command that disables bracketed paste mode. DisableFocusChange A command that disables focus event emission. DisableMouseCapture A command that disables mouse event capturing. EnableBracketedPaste A command that enables bracketed paste mode . EnableFocusChange A command that enables focus event emission. EnableMouseCapture A command that enables mouse event capturing. KeyEvent Represents a key event. KeyEventState Represents extra state about the key event. KeyModifiers Represents key modifiers (shift, control, alt, etc.). KeyboardEnhancementFlags Represents special flags that tell compatible terminals to add extra information to keyboard events. MouseEvent Represents a mouse event. PopKeyboardEnhancementFlags A command that disables extra kinds of keyboard events. Print A command that prints the given displayable type. PrintStyledContent A command that prints styled content. PushKeyboardEnhancementFlags A command that enables the kitty keyboard protocol , which adds extra information to keyboard events and removes ambiguity for modifier keys. ResetColor A command that resets the colors back to default. SetAttribute A command that sets an attribute. SetAttributes A command that sets several attributes. SetBackgroundColor A command that sets the the background color. SetColors A command that optionally sets the foreground and/or background color. SetForegroundColor A command that sets the the foreground color. SetStyle A command that sets a style (colors and attributes). SetUnderlineColor A command that sets the the underline color. StyledContent The style with the content to be styled. Attribute Represents an attribute. Color Represents a color. Colored Represents a foreground or background color. Event Represents an event. KeyCode Represents a key. KeyEventKind Represents a keyboard event kind. 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. SetCursorStyle A command that sets the style of the cursor.
It uses two types of escape codes, one to control blinking, and the other the shape. Stylize Provides a set of methods to set attributes and colors. available_color_count Returns available color count. force_color_output Forces colored output on or off globally, overriding NO_COLOR. poll Checks if there is an Event
available. read Reads a single Event
. style Creates a StyledContent
.