Raxol.Terminal.Style.StyleProcessor (Raxol v2.0.1)

View Source

Handles style management for the terminal emulator. This module extracts the style handling logic from the main emulator.

Summary

Functions

Applies a single style attribute to the current style.

Gets the style update function for a given attribute and value.

Returns the mapping of style attributes to their corresponding update functions.

Updates the emulator style with the given style attributes.

Functions

apply_style_attribute(arg, style)

Applies a single style attribute to the current style.

get_style_update_function(attr, value)

@spec get_style_update_function(atom(), any()) :: {:ok, function()} | :error

Gets the style update function for a given attribute and value.

get_style_updates()

@spec get_style_updates() :: map()

Returns the mapping of style attributes to their corresponding update functions.

update_style(emulator, style_attrs)

@spec update_style(any(), map()) :: any()

Updates the emulator style with the given style attributes.