Raxol.Terminal.ScreenUpdater (Raxol v0.5.0)
View SourceManages terminal screen state and updates.
This module is responsible for:
- Managing screen buffer state
- Handling screen updates
- Coordinating screen state transitions
- Managing screen dimensions
Summary
Functions
Updates the screen with multiple updates.
Clears the screen.
Gets the current screen dimensions.
Handles screen resize.
Updates the screen with a single update.
Functions
@spec batch_update_screen(Raxol.Terminal.Emulator.t(), [map()]) :: {Raxol.Terminal.Emulator.t(), any()}
Updates the screen with multiple updates.
Parameters
emulator
- The current terminal emulator stateupdates
- The list of screen updates to apply
Returns
{updated_emulator, output}
- The updated emulator state and any output
@spec clear_screen(Raxol.Terminal.Emulator.t()) :: Raxol.Terminal.Emulator.t()
Clears the screen.
Parameters
emulator
- The current terminal emulator state
Returns
updated_emulator
- The updated emulator state
@spec get_dimensions(Raxol.Terminal.Emulator.t()) :: {integer(), integer()}
Gets the current screen dimensions.
Parameters
emulator
- The current terminal emulator state
Returns
{width, height}
- The current screen dimensions
@spec handle_resize(Raxol.Terminal.Emulator.t(), integer(), integer()) :: Raxol.Terminal.Emulator.t()
Handles screen resize.
Parameters
emulator
- The current terminal emulator statewidth
- The new widthheight
- The new height
Returns
updated_emulator
- The updated emulator state
@spec update_screen(Raxol.Terminal.Emulator.t(), map()) :: {Raxol.Terminal.Emulator.t(), any()}
Updates the screen with a single update.
Parameters
emulator
- The current terminal emulator stateupdate
- The screen update to apply
Returns
{updated_emulator, output}
- The updated emulator state and any output