Raxol.Terminal.Manager.Callback behaviour (Raxol v0.5.0)

View Source

Behaviour for terminal manager event callbacks. Implement this behaviour to receive notifications for terminal events.

Summary

Callbacks

clipboard_event(op, content, state)

@callback clipboard_event(op :: atom(), content :: any(), state :: map()) :: any()

cursor_event(cursor, state)

@callback cursor_event(cursor :: map(), state :: map()) :: any()

focus_changed(focused, state)

@callback focus_changed(focused :: boolean(), state :: map()) :: any()

mode_changed(mode, state)

@callback mode_changed(mode :: atom(), state :: map()) :: any()

paste_event(text, pos, state)

@callback paste_event(
  text :: String.t(),
  pos :: {integer(), integer()},
  state :: map()
) :: any()

resized(width, height, state)

@callback resized(width :: integer(), height :: integer(), state :: map()) :: any()

scroll_event(dir, delta, pos, state)

@callback scroll_event(
  dir :: atom(),
  delta :: integer(),
  pos :: {integer(), integer()},
  state :: map()
) :: any()

selection_changed(selection, state)

@callback selection_changed(selection :: map(), state :: map()) :: any()