Full-buffer snapshot returned by ExRatatui.CellSession.take_cells/1.
Carries the dimensions of the buffer plus every cell, in row-major
order — cells has length width * height. Use this when the
complete picture is needed: initial paint after a fresh client
connects, one-off screenshot, regression test fixture.
For streaming updates use ExRatatui.CellSession.take_cells_diff/1
instead, which returns the same Cell shape inside an
ExRatatui.CellSession.Diff payload but only includes cells that
changed since the last diff call.
Fields
:width— terminal width in cells:height— terminal height in cells:cells— list ofExRatatui.CellSession.Cell.t/0in row-major order:(0,0), (1,0), ..., (W-1,0), (0,1), ...:regions— list ofExRatatui.CellSession.Region.t/0, the pixel regions on screen (bitmaps from pixel-mode widgets). Always empty for a session created without a:font_size.
Examples
iex> %ExRatatui.CellSession.Snapshot{}
%ExRatatui.CellSession.Snapshot{width: 0, height: 0, cells: [], regions: []}
Summary
Functions
Builds a t/0 from the raw %{width, height, cells, regions} map the
NIF returns. Each tuple in cells is converted via
ExRatatui.CellSession.Cell.from_tuple/1, each map in regions via
ExRatatui.CellSession.Region.from_native/1. regions is the complete
list of pixel regions on screen (always empty for a session created
without a :font_size).
Types
@type t() :: %ExRatatui.CellSession.Snapshot{ cells: [ExRatatui.CellSession.Cell.t()], height: non_neg_integer(), regions: [ExRatatui.CellSession.Region.t()], width: non_neg_integer() }
Functions
@spec from_native(%{ :width => non_neg_integer(), :height => non_neg_integer(), :cells => [tuple()], optional(:regions) => [map()] }) :: t()
Builds a t/0 from the raw %{width, height, cells, regions} map the
NIF returns. Each tuple in cells is converted via
ExRatatui.CellSession.Cell.from_tuple/1, each map in regions via
ExRatatui.CellSession.Region.from_native/1. regions is the complete
list of pixel regions on screen (always empty for a session created
without a :font_size).