Raxol.Terminal.Mouse.Manager (Raxol v0.5.0)

View Source

Manages mouse events and tracking in the terminal, including button clicks, movement, and wheel events.

Summary

Functions

Disables mouse tracking.

Disables cell motion tracking.

Disables highlight tracking.

Disables pixel position tracking.

Disables SGR mode.

Disables URXVT mode.

Enables mouse tracking.

Enables cell motion tracking.

Enables highlight tracking.

Enables pixel position tracking.

Enables SGR mode.

Enables URXVT mode.

Checks if mouse tracking is enabled.

Gets the current button state.

Gets the current mouse tracking mode.

Gets the last known mouse position.

Creates a new mouse manager instance.

Resets the mouse manager to its initial state.

Updates the button state.

Sets the mouse tracking mode.

Updates the last known mouse position.

Types

button_state()

@type button_state() :: :none | :left | :middle | :right | :wheel_up | :wheel_down

mouse_mode()

@type mouse_mode() :: :normal | :button_event | :any_event | :highlight_tracking

position()

@type position() :: {non_neg_integer(), non_neg_integer()}

t()

@type t() :: %Raxol.Terminal.Mouse.Manager{
  button_state: button_state(),
  cell_motion_tracking: boolean(),
  enabled: boolean(),
  highlight_tracking: boolean(),
  last_position: position() | nil,
  mode: mouse_mode(),
  pixel_position_tracking: boolean(),
  sgr_mode: boolean(),
  tracking_enabled: boolean(),
  urxvt_mode: boolean()
}

Functions

disable(manager)

Disables mouse tracking.

disable_cell_motion_tracking(manager)

Disables cell motion tracking.

disable_highlight_tracking(manager)

Disables highlight tracking.

disable_pixel_position_tracking(manager)

Disables pixel position tracking.

disable_sgr_mode(manager)

Disables SGR mode.

disable_urxvt_mode(manager)

Disables URXVT mode.

enable(manager)

Enables mouse tracking.

enable_cell_motion_tracking(manager)

Enables cell motion tracking.

enable_highlight_tracking(manager)

Enables highlight tracking.

enable_pixel_position_tracking(manager)

Enables pixel position tracking.

enable_sgr_mode(manager)

Enables SGR mode.

enable_urxvt_mode(manager)

Enables URXVT mode.

enabled?(manager)

Checks if mouse tracking is enabled.

get_button_state(manager)

Gets the current button state.

get_mode(manager)

Gets the current mouse tracking mode.

get_position(manager)

Gets the last known mouse position.

new()

Creates a new mouse manager instance.

reset(manager)

Resets the mouse manager to its initial state.

set_button_state(manager, state)

Updates the button state.

set_mode(manager, mode)

Sets the mouse tracking mode.

set_position(manager, position)

Updates the last known mouse position.