Raxol.Terminal.ScreenManager (Raxol v0.5.0)

View Source

Manages screen buffer operations for the terminal emulator. This module handles operations related to the main and alternate screen buffers, including buffer switching, initialization, and state management.

Summary

Functions

Gets the currently active screen buffer.

Gets the current buffer type (main or alternate).

Initializes both main and alternate screen buffers.

Sets the buffer type.

Switches between main and alternate screen buffers.

Updates the currently active screen buffer.

Functions

get_active_buffer(emulator)

Gets the currently active screen buffer.

get_buffer_type(emulator)

@spec get_buffer_type(Raxol.Terminal.Emulator.Struct.t()) :: :main | :alternate

Gets the current buffer type (main or alternate).

initialize_buffers(width, height, scrollback_limit)

Initializes both main and alternate screen buffers.

resize_buffers(emulator, new_width, new_height)

Resizes both screen buffers.

set_buffer_type(emulator, type)

@spec set_buffer_type(Raxol.Terminal.Emulator.Struct.t(), :main | :alternate) ::
  Raxol.Terminal.Emulator.Struct.t()

Sets the buffer type.

switch_buffer(emulator)

Switches between main and alternate screen buffers.

update_active_buffer(emulator, new_buffer)

Updates the currently active screen buffer.