Raxol.Terminal.ANSI.WindowEvents (Raxol v0.5.0)

View Source

Handles window events for terminal control. Supports window close, minimize, maximize, restore, and other window events.

Features

  • Window close events
  • Window minimize/maximize events
  • Window focus events
  • Window move events
  • Window resize events
  • Window state change events
  • Window visibility events
  • Window activation events
  • Window drag events
  • Window drop events

Summary

Functions

Disables window event reporting.

Enables window event reporting.

Formats a window event into an ANSI escape sequence.

Processes a window event sequence and returns the corresponding event.

Processes window-related ANSI escape sequences. Returns updated emulator state and any commands that need to be executed.

Types

window_event()

@type window_event() :: {:window_event, window_event_type(), map()}

window_event_type()

@type window_event_type() ::
  :close
  | :minimize
  | :maximize
  | :restore
  | :focus
  | :blur
  | :move
  | :resize
  | :state_change
  | :show
  | :hide
  | :activate
  | :deactivate
  | :drag_start
  | :drag_end
  | :drop

Functions

disable_window_events()

@spec disable_window_events() :: String.t()

Disables window event reporting.

enable_window_events()

@spec enable_window_events() :: String.t()

Enables window event reporting.

format_event(event)

Formats a window event into an ANSI escape sequence.

process_sequence(sequence, params)

@spec process_sequence(String.t(), [String.t()]) :: window_event() | nil

Processes a window event sequence and returns the corresponding event.

process_window_event(emulator_state, event)

Processes window-related ANSI escape sequences. Returns updated emulator state and any commands that need to be executed.