Function ratatui_create

Source
#[no_mangle]
pub extern "C" fn ratatui_create(
    cols: u16,
    rows: u16,
    font_size: f32,
) -> *mut c_void
Expand description

Creates a terminal instance and returns an opaque handle.

The resulting handle owns:

  • a ratatui Terminal backed by TestBackend sized cols × rows cells,
  • a glyph-cached FontManager at font_size pixels,
  • a pre-allocated RGB24 pixel buffer matching cols × rows × cell_size.

The handle must eventually be released with ratatui_destroy.

§Parameters

  • cols: terminal width in character cells.
  • rows: terminal height in character cells.
  • font_size: glyph rasterization size in pixels (e.g. 14.0).