Raxol.Terminal.Emulator.Style.Behaviour behaviour (Raxol v0.5.0)

View Source

Defines the behaviour for terminal emulator style management. This includes handling text attributes, colors, and text formatting.

Summary

Types

blink()

@type blink() :: :none | :slow | :rapid

color()

@type color() :: {0..255, 0..255, 0..255} | :default

decoration()

@type decoration() ::
  :none | :underline | :double_underline | :overline | :strikethrough

intensity()

@type intensity() :: :normal | :bold | :faint

Callbacks

reset_attributes(t)

@callback reset_attributes(Raxol.Terminal.Emulator.Struct.t()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()}

set_attributes(t, list)

@callback set_attributes(Raxol.Terminal.Emulator.Struct.t(), list()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}

set_background(t, arg2)

@callback set_background(Raxol.Terminal.Emulator.Struct.t(), atom() | tuple()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}

set_blink(t, blink)

@callback set_blink(Raxol.Terminal.Emulator.Struct.t(), blink()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}

set_decoration(t, decoration)

@callback set_decoration(Raxol.Terminal.Emulator.Struct.t(), decoration()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}

set_foreground(t, arg2)

@callback set_foreground(Raxol.Terminal.Emulator.Struct.t(), atom() | tuple()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}

set_intensity(t, intensity)

@callback set_intensity(Raxol.Terminal.Emulator.Struct.t(), intensity()) ::
  {:ok, Raxol.Terminal.Emulator.Struct.t()} | {:error, String.t()}