Raxol.Terminal.Buffer.BufferManager (Raxol v2.0.1)

View Source

Buffer manager for terminal operations.

This module provides a centralized interface for buffer management, consolidating buffer operations for the terminal renderer.

Summary

Functions

batch_operations(pid, operations)

See Raxol.Terminal.Buffer.BufferServer.batch_operations/2.

clear(pid)

flush(pid)

See Raxol.Terminal.Buffer.BufferServer.flush/1.

get_cell(pid, x, y)

See Raxol.Terminal.Buffer.BufferServer.get_cell/3.

get_content(pid)

See Raxol.Terminal.Buffer.BufferServer.get_content/1.

get_cursor_position(pid)

get_dimensions(pid)

See Raxol.Terminal.Buffer.BufferServer.get_dimensions/1.

get_size(pid)

resize(pid, width, height)

See Raxol.Terminal.Buffer.BufferServer.resize/3.

set_cell(pid, x, y, cell)

See Raxol.Terminal.Buffer.BufferServer.set_cell/4.

start_link(opts)

update_cursor_position(pid, x, y)

write(pid, text)

@spec write(pid(), String.t()) :: {:ok, pid()}

Writes text to the buffer at the current cursor position.

This is a simplified interface that writes text character by character starting at the current cursor position.

write_at(pid, x, y, text)

@spec write_at(pid(), non_neg_integer(), non_neg_integer(), String.t()) ::
  {:ok, pid()}

Writes text to the buffer at a specific position.