Raxol.Terminal.Cursor (Raxol v0.5.0)
View SourceProvides cursor manipulation functions for the terminal emulator. This module handles operations like moving the cursor, setting its visibility, and managing cursor state.
Summary
Functions
Gets the current cursor position.
Moves the cursor backward by the specified number of columns.
Moves the cursor down by the specified number of lines.
Moves the cursor down and to the beginning of the line.
Moves the cursor forward by the specified number of columns.
Moves the cursor left by the specified number of columns.
Moves the cursor right by the specified number of columns.
Moves the cursor to the specified position.
Moves the cursor to the specified row and column.
Moves the cursor to the specified position, taking into account the screen width and height.
Moves the cursor to the specified column.
Moves the cursor up by the specified number of lines.
Moves the cursor up and to the beginning of the line.
Sets the cursor shape.
Sets the cursor visibility.
Types
@type t() :: %Raxol.Terminal.Cursor{ position: {non_neg_integer(), non_neg_integer()}, shape: atom(), visible: boolean() }
Functions
@spec get_position(Raxol.Terminal.Emulator.Struct.t()) :: {non_neg_integer(), non_neg_integer()}
Gets the current cursor position.
@spec move_backward(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor backward by the specified number of columns.
@spec move_down(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor down by the specified number of lines.
@spec move_down_and_home(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor down and to the beginning of the line.
@spec move_forward(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor forward by the specified number of columns.
@spec move_left(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor left by the specified number of columns.
@spec move_right(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor right by the specified number of columns.
@spec move_to( Raxol.Terminal.Emulator.Struct.t(), {non_neg_integer(), non_neg_integer()} ) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor to the specified position.
@spec move_to( Raxol.Terminal.Emulator.Struct.t(), non_neg_integer(), non_neg_integer() ) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor to the specified row and column.
@spec move_to( t(), {non_neg_integer(), non_neg_integer()}, non_neg_integer(), non_neg_integer() ) :: t()
Moves the cursor to the specified position, taking into account the screen width and height.
@spec move_to_column(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor to the specified column.
@spec move_up(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor up by the specified number of lines.
@spec move_up_and_home(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Moves the cursor up and to the beginning of the line.
@spec set_shape(Raxol.Terminal.Emulator.Struct.t(), non_neg_integer()) :: Raxol.Terminal.Emulator.Struct.t()
Sets the cursor shape.
@spec set_visible(Raxol.Terminal.Emulator.Struct.t(), boolean()) :: Raxol.Terminal.Emulator.Struct.t()
Sets the cursor visibility.