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

View Source

Dimension and resize operation functions extracted from the main emulator module. Handles terminal resizing and dimension getters.

Summary

Functions

Gets the height of the terminal.

Gets the current scroll region.

Gets the width of the terminal.

Resizes the terminal emulator to new dimensions.

Types

emulator()

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

Functions

get_height(emulator)

@spec get_height(emulator()) :: non_neg_integer()

Gets the height of the terminal.

get_scroll_region(emulator)

@spec get_scroll_region(emulator()) :: {non_neg_integer(), non_neg_integer()} | nil

Gets the current scroll region.

get_width(emulator)

@spec get_width(emulator()) :: non_neg_integer()

Gets the width of the terminal.

resize(emulator, width, height)

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

Resizes the terminal emulator to new dimensions.