Raxol.Terminal.Render.RenderServer (Raxol v2.0.1)

View Source

Provides a unified interface for terminal rendering operations.

Summary

Functions

Returns a specification to start this module under a supervisor.

Cleans up resources.

Gets the current window title.

Initializes the GenServer with default state.

Initializes the terminal.

Renders the current state.

Renders the current state with a specific renderer ID.

Resets the configuration to defaults.

Resizes the renderer.

Sets a specific configuration value.

Sets cursor visibility.

Sets the window title.

Shuts down the terminal.

Updates the renderer configuration with a single argument.

Updates the renderer configuration.

Types

t()

@type t() :: %Raxol.Terminal.Render.RenderServer{
  buffer: Raxol.Terminal.Buffer.t(),
  cache: map(),
  cursor_visible: boolean(),
  font_settings: map(),
  fps: integer(),
  screen: term(),
  style: term(),
  termbox_initialized: boolean(),
  theme: map(),
  title: String.t()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

cleanup(state)

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

Cleans up resources.

get_title()

@spec get_title() :: String.t()

Gets the current window title.

handle_manager_call(request, from, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_call/3.

handle_manager_cast(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.

handle_manager_info(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.

init_manager(opts)

Initializes the GenServer with default state.

init_terminal()

@spec init_terminal() :: :ok

Initializes the terminal.

render(state)

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

Renders the current state.

render(state, renderer_id)

@spec render(t(), String.t()) :: :ok

Renders the current state with a specific renderer ID.

reset_config()

@spec reset_config() :: :ok

Resets the configuration to defaults.

resize(width, height)

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

Resizes the renderer.

set_config_value(key, value)

@spec set_config_value(atom(), any()) :: :ok

Sets a specific configuration value.

set_cursor_visibility(visible)

@spec set_cursor_visibility(boolean()) :: :ok

Sets cursor visibility.

set_title(title)

@spec set_title(String.t()) :: :ok

Sets the window title.

shutdown_terminal()

@spec shutdown_terminal() :: :ok

Shuts down the terminal.

start_link(init_opts \\ [])

update_config(config)

@spec update_config(map()) :: :ok

Updates the renderer configuration with a single argument.

update_config(state, config)

@spec update_config(t(), map()) :: :ok

Updates the renderer configuration.