Raxol.Terminal.Emulator.BufferOperations (Raxol v2.0.1)

View Source

Buffer operation functions extracted from the main emulator module. Handles active buffer management and buffer switching operations.

Summary

Functions

Clears the entire screen and scrollback buffer.

Clears the scrollback buffer.

Gets the active buffer from the emulator based on active_buffer_type.

Switches to the alternate screen buffer.

Switches to the alternate screen buffer.

Switches to the main screen buffer.

Switches to the normal (main) screen buffer.

Updates the active buffer with new buffer data.

Writes data to the output buffer.

Types

emulator()

@type emulator() :: Raxol.Terminal.Emulator.t()

Functions

clear_entire_screen_and_scrollback(emulator)

@spec clear_entire_screen_and_scrollback(emulator()) :: emulator()

Clears the entire screen and scrollback buffer.

clear_scrollback(emulator)

@spec clear_scrollback(emulator()) :: emulator()

Clears the scrollback buffer.

get_screen_buffer(emulator)

@spec get_screen_buffer(emulator()) :: Raxol.Terminal.ScreenBuffer.t()

Gets the active buffer from the emulator based on active_buffer_type.

switch_to_alternate_buffer(emulator)

@spec switch_to_alternate_buffer(emulator()) :: emulator()

Switches to the alternate screen buffer.

switch_to_alternate_screen(emulator)

@spec switch_to_alternate_screen(emulator()) :: emulator()

Switches to the alternate screen buffer.

switch_to_main_buffer(emulator)

@spec switch_to_main_buffer(emulator()) :: emulator()

Switches to the main screen buffer.

switch_to_normal_screen(emulator)

@spec switch_to_normal_screen(emulator()) :: emulator()

Switches to the normal (main) screen buffer.

update_active_buffer(emulator, new_buffer)

@spec update_active_buffer(emulator(), Raxol.Terminal.ScreenBuffer.t()) :: emulator()

Updates the active buffer with new buffer data.

write_to_output(emulator, data)

@spec write_to_output(emulator(), binary()) :: emulator()

Writes data to the output buffer.