Raxol.Terminal.Integration.State (Raxol v0.5.0)

View Source

Manages the state of the integrated terminal system.

Summary

Functions

Cleans up resources.

Gets the current memory usage.

Gets the current scroll position.

Gets the visible content from the current window.

Creates a new integration state with the given options.

Renders the current state.

Resizes the terminal.

Updates the integration state with new content.

Updates the renderer configuration.

Types

t()

@type t() :: %Raxol.Terminal.Integration.State{
  buffer: any(),
  buffer_manager: Raxol.Terminal.Buffer.UnifiedManager.t(),
  config: Raxol.Terminal.Integration.Config.t(),
  input: any(),
  io: Raxol.Terminal.IO.UnifiedIO.t(),
  output: any(),
  renderer: Raxol.Terminal.Render.UnifiedRenderer.t(),
  scroll_buffer: Raxol.Terminal.Scroll.UnifiedScroll.t(),
  window: any(),
  window_manager: Raxol.Terminal.Window.UnifiedWindow.t()
}

Functions

cleanup(state)

@spec cleanup(t()) :: :ok

Cleans up resources.

get_memory_usage(state)

@spec get_memory_usage(t()) :: integer()

Gets the current memory usage.

get_scroll_position(state)

@spec get_scroll_position(t()) :: integer()

Gets the current scroll position.

get_visible_content(state)

@spec get_visible_content(t()) :: list()

Gets the visible content from the current window.

new(opts \\ [])

@spec new(map()) :: t()

Creates a new integration state with the given options.

render(state)

@spec render(t()) :: t()

Renders the current state.

resize(state, width, height)

@spec resize(t(), non_neg_integer(), non_neg_integer()) :: t()

Resizes the terminal.

update(state, content)

@spec update(t(), String.t()) :: t()

Updates the integration state with new content.

update_renderer_config(state, config)

@spec update_renderer_config(t(), map()) :: t()

Updates the renderer configuration.