Function ratatui_set_style

Source
#[no_mangle]
pub extern "C" fn ratatui_set_style(
    handle: *mut c_void,
    fg_r: u8,
    fg_g: u8,
    fg_b: u8,
    use_default_fg: u8,
    bg_r: u8,
    bg_g: u8,
    bg_b: u8,
    use_default_bg: u8,
    modifiers: u8,
)
Expand description

Sets the pending style consumed by the next widget-producing FFI call.

The pending style is reset to default after each widget call and at the start of every frame. Widgets that do not accept a style (e.g. scrollbar, calendar, chart, canvas) ignore the pending style.

§Parameters

  • fg_r, fg_g, fg_b: foreground RGB components.
  • use_default_fg: non-zero to leave the foreground unset (terminal default); zero to apply the given RGB triple.
  • bg_r, bg_g, bg_b: background RGB components.
  • use_default_bg: non-zero to leave the background unset; zero to apply the given RGB triple.
  • modifiers: bit field — 0x01 Bold, 0x02 Italic, 0x04 Underlined, 0x08 Dim.