Module prelude

Source

Re-exports§

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::*;

Macros§

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

Structs§

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.

Enums§

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.

Traits§

Stylize
Provides a set of methods to set attributes and colors.

Functions§

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.