Skip to main content

ratatui_split

Function ratatui_split 

Source
#[unsafe(no_mangle)]
pub extern "C" fn ratatui_split( handle: *mut c_void, area_id: u32, direction: u8, constraint_types: *const u8, constraint_values: *const u16, count: u32, out_ids: *mut u32, ) -> u32
Expand description

Splits an existing area into count child areas and writes their ids into out_ids.

§Parameters

  • area_id: id of the parent area to split.
  • direction: 0 = horizontal split (left → right), any other value = vertical split (top → bottom).
  • constraint_types: array of length count describing each child’s constraint kind. Values: 0 = Length, 1 = Min, 2 = Max, 3 = Percentage, 4 (or any other) = Fill.
  • constraint_values: array of length count with the numeric value matching the constraint kind (cells for Length/Min/Max, 0..=100 for Percentage, weight for Fill).
  • count: number of child areas requested.
  • out_ids: caller-allocated buffer of length count that receives the ids of the newly registered child areas.

§Returns

The number of child areas actually written. Returns 0 if any required pointer is null, count is zero, or the parent id is unknown.