Raxol.Terminal.Integration.Renderer (Raxol v0.5.0)
View SourceHandles terminal output rendering and display management using Termbox2.
Summary
Functions
Clears the terminal screen (specifically, the back buffer). Call present/0 afterwards to make it visible. Returns :ok or {:error, reason}.
Gets the current terminal dimensions. Returns {:ok, {width, height}} or {:error, :dimensions_unavailable}. Note: termbox2 width/height C functions return int, not status codes. A negative value might indicate an error (e.g., not initialized).
Gets the terminal title.
Initializes the underlying terminal system. Must be called before other rendering functions. Returns :ok or {:error, reason}.
Moves the hardware cursor to a specific position on the screen. Call present/0 afterwards if you want to ensure it's shown with other changes. The cursor position is typically updated with present/0. Returns :ok or {:error, reason}.
Creates a new renderer with the given options.
Renders the current terminal state to the screen. Returns :ok or {:error, reason}.
Resets the renderer configuration to defaults.
Resizes the renderer to the given dimensions.
Sets a specific configuration value.
Sets the cursor visibility.
Sets the terminal title.
Shuts down the underlying terminal system. Must be called to restore terminal state. Returns :ok or {:error, reason}.
Updates the renderer configuration.
Functions
Clears the terminal screen (specifically, the back buffer). Call present/0 afterwards to make it visible. Returns :ok or {:error, reason}.
Gets the current terminal dimensions. Returns {:ok, {width, height}} or {:error, :dimensions_unavailable}. Note: termbox2 width/height C functions return int, not status codes. A negative value might indicate an error (e.g., not initialized).
Gets the terminal title.
Initializes the underlying terminal system. Must be called before other rendering functions. Returns :ok or {:error, reason}.
Moves the hardware cursor to a specific position on the screen. Call present/0 afterwards if you want to ensure it's shown with other changes. The cursor position is typically updated with present/0. Returns :ok or {:error, reason}.
Creates a new renderer with the given options.
Renders the current terminal state to the screen. Returns :ok or {:error, reason}.
Resets the renderer configuration to defaults.
Resizes the renderer to the given dimensions.
Sets a specific configuration value.
Sets the cursor visibility.
Sets the terminal title.
Shuts down the underlying terminal system. Must be called to restore terminal state. Returns :ok or {:error, reason}.
Updates the renderer configuration.