Raxol.Terminal.Buffer.Initializer (Raxol v0.5.0)

View Source

Handles initialization and validation of screen buffers. This module provides functions for creating new screen buffers and validating their dimensions and properties.

Summary

Functions

Creates a new screen buffer with the specified dimensions. Validates and normalizes the input dimensions to ensure they are valid.

Validates a dimension value, returning a default if invalid.

Functions

new(width, height, scrollback_limit \\ 1000)

Creates a new screen buffer with the specified dimensions. Validates and normalizes the input dimensions to ensure they are valid.

validate_dimension(dimension, default)

@spec validate_dimension(integer(), non_neg_integer()) :: non_neg_integer()

Validates a dimension value, returning a default if invalid.