Crate notcurses

Source
Expand description

A rusty notcurses wrapper.

§Example

use notcurses::*;

fn main() -> NotcursesResult<()> {
    let nc = Notcurses::new_cli()?;
    let mut cli = nc.cli_plane()?;
    cli.putstrln("\nhello world!")?;
    cli.render()?;
    Ok(())
}

Modules§

sys
Reexport of libnotcurses-sys.

Macros§

putstr
Prints to a plane, similarly as print!.
putstrln
Prints to a plane, with a new line, similarly as println!.

Structs§

Capabilities
The detected current terminal capabilities.
Cell
A Cell corresponds to a single grapheme cluster on some Plane,
Channel
The Rgb + Alpha of a Cell’s background or foreground.
Channels
A pair of both foreground and background Channels.
Input
A received input.
Key
A synthesized Received input event other than a char.
KeyMod
A bitmask of keyboard modifiers.
MiceEvents
A bitmask of mice input events.
Notcurses
Notcurses state for a given terminal, composed of Planes.
NotcursesBuilder
A Notcurses builder.
Palette
An array of 256 Channels.
Plane
A drawable text surface, composed of Cells.
PlaneBuilder
A Plane builder.
PlaneGeometry
The geometry of a Plane or a terminal.
Position
A 2D position using a clamped i32.
Rgb
A 24-bit RGB value.
Rgba
A 32-bit RGBA value.
Size
A 2D size using a positive clamped i32.
Statistics
Runtime statistics.
Style
A bitmask of styles.
Visual
A visual bit of multimedia.
VisualBuilder
A Visual builder.
VisualGeometry
The geometry of a Visual.
VisualOptions
The inner options of a Visual.

Enums§

Align
Alignment within a Plane or terminal.
Alpha
Alpha information, part of a Channel.
Blitter
Blitter mode to use for rasterizing a Visual.
InputType
The type of the Input event.
LogLevel
Stderr log level.
NotcursesError
The Notcurses error type.
PixelImplementation
Pixel blitting implementations, informative only.
Received
A received char or Key.
Scale
Indicates how to scale a Visual during rendering.

Type Aliases§

NotcursesResult
The Notcurses result type.