Skip to main content

ghostty_render_state_update

Function ghostty_render_state_update 

Source
pub unsafe extern "C" fn ghostty_render_state_update(
    state: RenderState,
    terminal: Terminal,
) -> Type
Expand description

Update a render state instance from a terminal.

This consumes terminal/screen dirty state in the same way as the internal render state update path.

This is a convenience function that performs a full update in one call, equivalent to ghostty_render_state_begin_update immediately followed by ghostty_render_state_end_update. Callers that hold a lock over the terminal state should prefer calling the two phases directly so that the lock is only held for the begin phase.

terminal is NULL, GHOSTTY_OUT_OF_MEMORY if updating the state requires allocation and that allocation fails