package miaou-driver-matrix

  1. Overview
  2. Docs
Miaou high-performance terminal driver with diff rendering

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.5.2.tar.gz
md5=60a3b9f181f24572a06a9492532bfdda
sha512=fcc35a275066be2900e6201782faf47503076fa4640f08cf78067835a6f447b74613009e55b2ac799adb7ca46f1bffa261fc5971753f2cc3c6bef327511c7ef6

doc/miaou-driver-matrix.driver/Miaou_driver_matrix/Matrix_cell/index.html

Module Miaou_driver_matrix.Matrix_cellSource

Terminal cell representation for the Matrix driver.

A cell represents a single character position on the terminal with its associated styling (colors, bold, dim, etc.).

Sourcetype style = {
  1. fg : int;
    (*

    Foreground color: -1 = default, 0-255 = 256-color palette

    *)
  2. bg : int;
    (*

    Background color: -1 = default, 0-255 = 256-color palette

    *)
  3. bold : bool;
  4. dim : bool;
  5. underline : bool;
  6. reverse : bool;
  7. url : string;
    (*

    OSC 8 hyperlink URL, "" = no link

    *)
}

Style attributes for a cell.

Sourcetype t = {
  1. mutable char : string;
    (*

    UTF-8 grapheme cluster, " " for empty/space

    *)
  2. mutable style : style;
}

A terminal cell containing a character and its style.

Sourceval default_style : style

Default style: no colors, no attributes.

Sourceval empty : unit -> t

Empty cell: space character with default style.

Sourceval create : char:string -> style:style -> t

Create a new cell with given character and style.

Sourceval copy : t -> t

Create a copy of a cell.

Sourceval reset : t -> unit

Reset a cell to empty state (space with default style).

Sourceval invalidate : t -> unit

Invalidate a cell so it never equals any valid cell. Used for force-redraw scenarios where we need to ensure the diff outputs changes even for cells that might otherwise appear unchanged. Sets char to \x00 which never appears in normal content.

Sourceval style_equal : style -> style -> bool

Check if two styles are equal.

Sourceval equal : t -> t -> bool

Check if two cells are equal (same char and style).

Sourceval is_empty : t -> bool

Check if a cell is empty (space with default style).