Raxol.Terminal.ANSI.WindowManipulation (Raxol v0.5.0)
View SourceHandles window manipulation sequences for terminal control. Supports window resizing, positioning, and state management.
Features
- Window resizing
- Window positioning
- Window state (minimize, maximize, restore)
- Window title management
- Window icon management
- Window stacking order
- Window transparency
- Window focus management
- Window borders and decorations
- Window events
- Window state persistence
- Window layout management
- Window group management
- Window animations
Summary
Functions
Clears the entire screen.
Disables window manipulation mode.
Enables window manipulation mode.
Formats a focus gain event into an ANSI sequence.
Formats a focus loss event into an ANSI sequence.
Formats a window event into an ANSI sequence.
Formats a key press event into an ANSI sequence.
Formats a key release event into an ANSI sequence.
Formats a mouse click event into an ANSI sequence.
Formats a mouse drag event into an ANSI sequence.
Formats a mouse release event into an ANSI sequence.
Moves the cursor to the specified position.
Processes a window manipulation sequence and returns the corresponding event.
Sets the window icon name.
Sets the window mode.
Sets the window title.
Types
@type window_border_style() :: :none | :single | :double | :rounded | :custom
@type window_event() :: {:window_resize, window_size()} | {:window_move, window_position()} | {:window_state, window_state()} | {:window_title, String.t()} | {:window_icon, String.t()} | {:window_focus, boolean()} | {:window_border, window_border_style()} | {:window_border_color, {non_neg_integer(), non_neg_integer(), non_neg_integer()}} | {:window_border_width, non_neg_integer()} | {:window_border_radius, non_neg_integer()} | {:window_shadow, boolean()} | {:window_shadow_color, {non_neg_integer(), non_neg_integer(), non_neg_integer()}} | {:window_shadow_blur, non_neg_integer()} | {:window_shadow_offset, {non_neg_integer(), non_neg_integer()}}
@type window_position() :: {non_neg_integer(), non_neg_integer()}
@type window_size() :: {non_neg_integer(), non_neg_integer()}
@type window_state() :: :normal | :minimized | :maximized | :fullscreen
Functions
@spec clear_screen() :: String.t()
Clears the entire screen.
@spec disable_window_manipulation() :: String.t()
Disables window manipulation mode.
@spec enable_window_manipulation() :: String.t()
Enables window manipulation mode.
@spec focus_gain() :: String.t()
Formats a focus gain event into an ANSI sequence.
@spec focus_loss() :: String.t()
Formats a focus loss event into an ANSI sequence.
@spec format_event(window_event()) :: String.t()
Formats a window event into an ANSI sequence.
Formats a key press event into an ANSI sequence.
Formats a key release event into an ANSI sequence.
@spec mouse_click(atom(), non_neg_integer(), non_neg_integer()) :: String.t()
Formats a mouse click event into an ANSI sequence.
@spec mouse_drag(atom(), non_neg_integer(), non_neg_integer()) :: String.t()
Formats a mouse drag event into an ANSI sequence.
@spec mouse_release(atom(), non_neg_integer(), non_neg_integer()) :: String.t()
Formats a mouse release event into an ANSI sequence.
Moves the cursor to the specified position.
@spec process_sequence(String.t(), [String.t()]) :: window_event() | nil
Processes a window manipulation sequence and returns the corresponding event.
Sets the window icon name.
Sets the window mode.
Sets the window title.