Raxol.Terminal.Emulator.Cursor (Raxol v0.3.0)
View SourceHandles cursor management for the terminal emulator. Provides functions for cursor position, style, movement, and state management.
Summary
Functions
Hides the cursor. Returns {:ok, updated_emulator}.
Moves the cursor down by the specified number of lines. Returns {:ok, updated_emulator} or {:error, reason}.
Moves the cursor left by the specified number of columns. Returns {:ok, updated_emulator} or {:error, reason}.
Moves the cursor right by the specified number of columns. Returns {:ok, updated_emulator} or {:error, reason}.
Moves the cursor to the specified position. Returns {:ok, updated_emulator} or {:error, reason}.
Moves the cursor up by the specified number of lines. Returns {:ok, updated_emulator} or {:error, reason}.
Restores the previously saved cursor state. Returns {:ok, updated_emulator} or {:error, reason}.
Saves the current cursor state. Returns {:ok, updated_emulator}.
Sets the cursor style. Returns {:ok, updated_emulator} or {:error, reason}.
Shows the cursor. Returns {:ok, updated_emulator}.
Functions
@spec hide(Raxol.Terminal.Core.t()) :: {:ok, Raxol.Terminal.Core.t()}
Hides the cursor. Returns {:ok, updated_emulator}.
@spec move_down(Raxol.Terminal.Core.t(), non_neg_integer()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Moves the cursor down by the specified number of lines. Returns {:ok, updated_emulator} or {:error, reason}.
@spec move_left(Raxol.Terminal.Core.t(), non_neg_integer()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Moves the cursor left by the specified number of columns. Returns {:ok, updated_emulator} or {:error, reason}.
@spec move_right(Raxol.Terminal.Core.t(), non_neg_integer()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Moves the cursor right by the specified number of columns. Returns {:ok, updated_emulator} or {:error, reason}.
@spec move_to(Raxol.Terminal.Core.t(), non_neg_integer(), non_neg_integer()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Moves the cursor to the specified position. Returns {:ok, updated_emulator} or {:error, reason}.
@spec move_up(Raxol.Terminal.Core.t(), non_neg_integer()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Moves the cursor up by the specified number of lines. Returns {:ok, updated_emulator} or {:error, reason}.
@spec restore_state(Raxol.Terminal.Core.t()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Restores the previously saved cursor state. Returns {:ok, updated_emulator} or {:error, reason}.
@spec save_state(Raxol.Terminal.Core.t()) :: {:ok, Raxol.Terminal.Core.t()}
Saves the current cursor state. Returns {:ok, updated_emulator}.
@spec set_style(Raxol.Terminal.Core.t(), Raxol.Terminal.Core.cursor_style_type()) :: {:ok, Raxol.Terminal.Core.t()} | {:error, String.t()}
Sets the cursor style. Returns {:ok, updated_emulator} or {:error, reason}.
@spec show(Raxol.Terminal.Core.t()) :: {:ok, Raxol.Terminal.Core.t()}
Shows the cursor. Returns {:ok, updated_emulator}.