fish-shell/fish-rust/src/output.rs
Mahmoud Al-Qudsi c409b1a89c Port env_dispatch dependencies to rust
Either add rust wrappers for C++ functions called via ffi or port some pure code
from C++ to rust to provide support for the upcoming `env_dispatch` rewrite.
2023-05-25 16:54:07 -05:00

20 lines
389 B
Rust

use bitflags::bitflags;
bitflags! {
pub struct ColorSupport: u8 {
const NONE = 0;
const TERM_256COLOR = 1<<0;
const TERM_24BIT = 1<<1;
}
}
pub fn output_set_color_support(value: ColorSupport) {
extern "C" {
pub fn output_set_color_support(value: libc::c_int);
}
unsafe {
output_set_color_support(value.bits() as i32);
}
}