/* automatically generated by rust-bindgen */ pub const LIBSIXEL_VERSION: &'static [u8; 6usize] = b"1.7.3\x00"; pub const LIBSIXEL_ABI_VERSION: &'static [u8; 6usize] = b"1:6:0\x00"; pub const SIXEL_OUTPUT_PACKET_SIZE: ::std::os::raw::c_uint = 16384; pub const SIXEL_PALETTE_MIN: ::std::os::raw::c_uint = 2; pub const SIXEL_PALETTE_MAX: ::std::os::raw::c_uint = 256; pub const SIXEL_USE_DEPRECATED_SYMBOLS: ::std::os::raw::c_uint = 1; pub const SIXEL_OK: ::std::os::raw::c_uint = 0; pub const SIXEL_FALSE: ::std::os::raw::c_uint = 4096; pub const SIXEL_RUNTIME_ERROR: ::std::os::raw::c_uint = 4352; pub const SIXEL_LOGIC_ERROR: ::std::os::raw::c_uint = 4608; pub const SIXEL_FEATURE_ERROR: ::std::os::raw::c_uint = 4864; pub const SIXEL_LIBC_ERROR: ::std::os::raw::c_uint = 5120; pub const SIXEL_CURL_ERROR: ::std::os::raw::c_uint = 5376; pub const SIXEL_JPEG_ERROR: ::std::os::raw::c_uint = 5632; pub const SIXEL_PNG_ERROR: ::std::os::raw::c_uint = 5888; pub const SIXEL_GDK_ERROR: ::std::os::raw::c_uint = 6144; pub const SIXEL_GD_ERROR: ::std::os::raw::c_uint = 6400; pub const SIXEL_STBI_ERROR: ::std::os::raw::c_uint = 6656; pub const SIXEL_STBIW_ERROR: ::std::os::raw::c_uint = 6912; pub const SIXEL_INTERRUPTED: ::std::os::raw::c_uint = 1; pub const SIXEL_BAD_ALLOCATION: ::std::os::raw::c_uint = 4353; pub const SIXEL_BAD_ARGUMENT: ::std::os::raw::c_uint = 4354; pub const SIXEL_BAD_INPUT: ::std::os::raw::c_uint = 4355; pub const SIXEL_NOT_IMPLEMENTED: ::std::os::raw::c_uint = 4865; pub const SIXEL_LARGE_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_LARGE_NORM: ::std::os::raw::c_uint = 1; pub const SIXEL_LARGE_LUM: ::std::os::raw::c_uint = 2; pub const SIXEL_REP_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_REP_CENTER_BOX: ::std::os::raw::c_uint = 1; pub const SIXEL_REP_AVERAGE_COLORS: ::std::os::raw::c_uint = 2; pub const SIXEL_REP_AVERAGE_PIXELS: ::std::os::raw::c_uint = 3; pub const SIXEL_DIFFUSE_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_DIFFUSE_NONE: ::std::os::raw::c_uint = 1; pub const SIXEL_DIFFUSE_ATKINSON: ::std::os::raw::c_uint = 2; pub const SIXEL_DIFFUSE_FS: ::std::os::raw::c_uint = 3; pub const SIXEL_DIFFUSE_JAJUNI: ::std::os::raw::c_uint = 4; pub const SIXEL_DIFFUSE_STUCKI: ::std::os::raw::c_uint = 5; pub const SIXEL_DIFFUSE_BURKES: ::std::os::raw::c_uint = 6; pub const SIXEL_QUALITY_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_QUALITY_HIGH: ::std::os::raw::c_uint = 1; pub const SIXEL_QUALITY_LOW: ::std::os::raw::c_uint = 2; pub const SIXEL_QUALITY_FULL: ::std::os::raw::c_uint = 3; pub const SIXEL_QUALITY_HIGHCOLOR: ::std::os::raw::c_uint = 4; pub const SIXEL_BUILTIN_MONO_DARK: ::std::os::raw::c_uint = 0; pub const SIXEL_BUILTIN_MONO_LIGHT: ::std::os::raw::c_uint = 1; pub const SIXEL_BUILTIN_XTERM16: ::std::os::raw::c_uint = 2; pub const SIXEL_BUILTIN_XTERM256: ::std::os::raw::c_uint = 3; pub const SIXEL_BUILTIN_VT340_MONO: ::std::os::raw::c_uint = 4; pub const SIXEL_BUILTIN_VT340_COLOR: ::std::os::raw::c_uint = 5; pub const SIXEL_BUILTIN_G1: ::std::os::raw::c_uint = 6; pub const SIXEL_BUILTIN_G2: ::std::os::raw::c_uint = 7; pub const SIXEL_BUILTIN_G4: ::std::os::raw::c_uint = 8; pub const SIXEL_BUILTIN_G8: ::std::os::raw::c_uint = 9; pub const SIXEL_FORMATTYPE_COLOR: ::std::os::raw::c_uint = 0; pub const SIXEL_FORMATTYPE_GRAYSCALE: ::std::os::raw::c_uint = 64; pub const SIXEL_FORMATTYPE_PALETTE: ::std::os::raw::c_uint = 128; pub const SIXEL_PIXELFORMAT_RGB555: ::std::os::raw::c_uint = 1; pub const SIXEL_PIXELFORMAT_RGB565: ::std::os::raw::c_uint = 2; pub const SIXEL_PIXELFORMAT_RGB888: ::std::os::raw::c_uint = 3; pub const SIXEL_PIXELFORMAT_BGR555: ::std::os::raw::c_uint = 4; pub const SIXEL_PIXELFORMAT_BGR565: ::std::os::raw::c_uint = 5; pub const SIXEL_PIXELFORMAT_BGR888: ::std::os::raw::c_uint = 6; pub const SIXEL_PIXELFORMAT_ARGB8888: ::std::os::raw::c_uint = 16; pub const SIXEL_PIXELFORMAT_RGBA8888: ::std::os::raw::c_uint = 17; pub const SIXEL_PIXELFORMAT_ABGR8888: ::std::os::raw::c_uint = 18; pub const SIXEL_PIXELFORMAT_BGRA8888: ::std::os::raw::c_uint = 19; pub const SIXEL_PIXELFORMAT_G1: ::std::os::raw::c_uint = 64; pub const SIXEL_PIXELFORMAT_G2: ::std::os::raw::c_uint = 65; pub const SIXEL_PIXELFORMAT_G4: ::std::os::raw::c_uint = 66; pub const SIXEL_PIXELFORMAT_G8: ::std::os::raw::c_uint = 67; pub const SIXEL_PIXELFORMAT_AG88: ::std::os::raw::c_uint = 83; pub const SIXEL_PIXELFORMAT_GA88: ::std::os::raw::c_uint = 99; pub const SIXEL_PIXELFORMAT_PAL1: ::std::os::raw::c_uint = 128; pub const SIXEL_PIXELFORMAT_PAL2: ::std::os::raw::c_uint = 129; pub const SIXEL_PIXELFORMAT_PAL4: ::std::os::raw::c_uint = 130; pub const SIXEL_PIXELFORMAT_PAL8: ::std::os::raw::c_uint = 131; pub const SIXEL_PALETTETYPE_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_PALETTETYPE_HLS: ::std::os::raw::c_uint = 1; pub const SIXEL_PALETTETYPE_RGB: ::std::os::raw::c_uint = 2; pub const SIXEL_ENCODEPOLICY_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_ENCODEPOLICY_FAST: ::std::os::raw::c_uint = 1; pub const SIXEL_ENCODEPOLICY_SIZE: ::std::os::raw::c_uint = 2; pub const SIXEL_RES_NEAREST: ::std::os::raw::c_uint = 0; pub const SIXEL_RES_GAUSSIAN: ::std::os::raw::c_uint = 1; pub const SIXEL_RES_HANNING: ::std::os::raw::c_uint = 2; pub const SIXEL_RES_HAMMING: ::std::os::raw::c_uint = 3; pub const SIXEL_RES_BILINEAR: ::std::os::raw::c_uint = 4; pub const SIXEL_RES_WELSH: ::std::os::raw::c_uint = 5; pub const SIXEL_RES_BICUBIC: ::std::os::raw::c_uint = 6; pub const SIXEL_RES_LANCZOS2: ::std::os::raw::c_uint = 7; pub const SIXEL_RES_LANCZOS3: ::std::os::raw::c_uint = 8; pub const SIXEL_RES_LANCZOS4: ::std::os::raw::c_uint = 9; pub const SIXEL_FORMAT_GIF: ::std::os::raw::c_uint = 0; pub const SIXEL_FORMAT_PNG: ::std::os::raw::c_uint = 1; pub const SIXEL_FORMAT_BMP: ::std::os::raw::c_uint = 2; pub const SIXEL_FORMAT_JPG: ::std::os::raw::c_uint = 3; pub const SIXEL_FORMAT_TGA: ::std::os::raw::c_uint = 4; pub const SIXEL_FORMAT_WBMP: ::std::os::raw::c_uint = 5; pub const SIXEL_FORMAT_TIFF: ::std::os::raw::c_uint = 6; pub const SIXEL_FORMAT_SIXEL: ::std::os::raw::c_uint = 7; pub const SIXEL_FORMAT_PNM: ::std::os::raw::c_uint = 8; pub const SIXEL_FORMAT_GD2: ::std::os::raw::c_uint = 9; pub const SIXEL_FORMAT_PSD: ::std::os::raw::c_uint = 10; pub const SIXEL_FORMAT_HDR: ::std::os::raw::c_uint = 11; pub const SIXEL_LOOP_AUTO: ::std::os::raw::c_uint = 0; pub const SIXEL_LOOP_FORCE: ::std::os::raw::c_uint = 1; pub const SIXEL_LOOP_DISABLE: ::std::os::raw::c_uint = 2; pub const SIXEL_OPTFLAG_INPUT: u8 = b'i'; pub const SIXEL_OPTFLAG_OUTPUT: u8 = b'o'; pub const SIXEL_OPTFLAG_OUTFILE: u8 = b'o'; pub const SIXEL_OPTFLAG_7BIT_MODE: u8 = b'7'; pub const SIXEL_OPTFLAG_8BIT_MODE: u8 = b'8'; pub const SIXEL_OPTFLAG_HAS_GRI_ARG_LIMIT: u8 = b'R'; pub const SIXEL_OPTFLAG_COLORS: u8 = b'p'; pub const SIXEL_OPTFLAG_MAPFILE: u8 = b'm'; pub const SIXEL_OPTFLAG_MONOCHROME: u8 = b'e'; pub const SIXEL_OPTFLAG_INSECURE: u8 = b'k'; pub const SIXEL_OPTFLAG_INVERT: u8 = b'i'; pub const SIXEL_OPTFLAG_HIGH_COLOR: u8 = b'I'; pub const SIXEL_OPTFLAG_USE_MACRO: u8 = b'u'; pub const SIXEL_OPTFLAG_MACRO_NUMBER: u8 = b'n'; pub const SIXEL_OPTFLAG_COMPLEXION_SCORE: u8 = b'C'; pub const SIXEL_OPTFLAG_IGNORE_DELAY: u8 = b'g'; pub const SIXEL_OPTFLAG_STATIC: u8 = b'S'; pub const SIXEL_OPTFLAG_DIFFUSION: u8 = b'd'; pub const SIXEL_OPTFLAG_FIND_LARGEST: u8 = b'f'; pub const SIXEL_OPTFLAG_SELECT_COLOR: u8 = b's'; pub const SIXEL_OPTFLAG_CROP: u8 = b'c'; pub const SIXEL_OPTFLAG_WIDTH: u8 = b'w'; pub const SIXEL_OPTFLAG_HEIGHT: u8 = b'h'; pub const SIXEL_OPTFLAG_RESAMPLING: u8 = b'r'; pub const SIXEL_OPTFLAG_QUALITY: u8 = b'q'; pub const SIXEL_OPTFLAG_LOOPMODE: u8 = b'l'; pub const SIXEL_OPTFLAG_PALETTE_TYPE: u8 = b't'; pub const SIXEL_OPTFLAG_BUILTIN_PALETTE: u8 = b'b'; pub const SIXEL_OPTFLAG_ENCODE_POLICY: u8 = b'E'; pub const SIXEL_OPTFLAG_BGCOLOR: u8 = b'B'; pub const SIXEL_OPTFLAG_PENETRATE: u8 = b'P'; pub const SIXEL_OPTFLAG_PIPE_MODE: u8 = b'D'; pub const SIXEL_OPTFLAG_VERBOSE: u8 = b'v'; pub const SIXEL_OPTFLAG_VERSION: u8 = b'V'; pub const SIXEL_OPTFLAG_HELP: u8 = b'H'; pub type wchar_t = ::std::os::raw::c_int; pub type SIXELSTATUS = ::std::os::raw::c_int; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum characterSize { CSIZE_7BIT = 0, CSIZE_8BIT = 1, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum methodForLargest { LARGE_AUTO = 0, LARGE_NORM = 1, LARGE_LUM = 2, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum methodForRep { REP_AUTO = 0, REP_CENTER_BOX = 1, REP_AVERAGE_COLORS = 2, REP_AVERAGE_PIXELS = 3, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum methodForDiffuse { DIFFUSE_AUTO = 0, DIFFUSE_NONE = 1, DIFFUSE_ATKINSON = 2, DIFFUSE_FS = 3, DIFFUSE_JAJUNI = 4, DIFFUSE_STUCKI = 5, DIFFUSE_BURKES = 6, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum qualityMode { QUALITY_AUTO = 0, QUALITY_HIGH = 1, QUALITY_LOW = 2, QUALITY_FULL = 3, QUALITY_HIGHCOLOR = 4, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum builtinDither { BUILTIN_MONO_DARK = 0, BUILTIN_MONO_LIGHT = 1, BUILTIN_XTERM16 = 2, BUILTIN_XTERM256 = 3, BUILTIN_VT340_MONO = 4, BUILTIN_VT340_COLOR = 5, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum formatType { FORMATTYPE_COLOR = 0, FORMATTYPE_GRAYSCALE = 64, FORMATTYPE_PALETTE = 128, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum pixelFormat { PIXELFORMAT_RGB555 = 1, PIXELFORMAT_RGB565 = 2, PIXELFORMAT_RGB888 = 3, PIXELFORMAT_BGR555 = 4, PIXELFORMAT_BGR565 = 5, PIXELFORMAT_BGR888 = 6, PIXELFORMAT_ARGB8888 = 16, PIXELFORMAT_RGBA8888 = 17, PIXELFORMAT_G1 = 64, PIXELFORMAT_G2 = 65, PIXELFORMAT_G4 = 66, PIXELFORMAT_G8 = 67, PIXELFORMAT_AG88 = 83, PIXELFORMAT_GA88 = 99, PIXELFORMAT_PAL1 = 128, PIXELFORMAT_PAL2 = 129, PIXELFORMAT_PAL4 = 130, PIXELFORMAT_PAL8 = 131, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum paletteType { PALETTETYPE_AUTO = 0, PALETTETYPE_HLS = 1, PALETTETYPE_RGB = 2, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum encodePolicy { ENCODEPOLICY_AUTO = 0, ENCODEPOLICY_FAST = 1, ENCODEPOLICY_SIZE = 2, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum methodForResampling { RES_NEAREST = 0, RES_GAUSSIAN = 1, RES_HANNING = 2, RES_HAMMING = 3, RES_BILINEAR = 4, RES_WELSH = 5, RES_BICUBIC = 6, RES_LANCZOS2 = 7, RES_LANCZOS3 = 8, RES_LANCZOS4 = 9, } pub type sixel_malloc_t = ::std::option::Option *mut ::std::os::raw::c_void>; pub type sixel_calloc_t = ::std::option::Option *mut ::std::os::raw::c_void>; pub type sixel_realloc_t = ::std::option::Option *mut ::std::os::raw::c_void>; pub type sixel_free_t = ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sixel_allocator([u8; 0]); pub type sixel_allocator_t = sixel_allocator; extern "C" { pub fn sixel_allocator_new(ppallocator: *mut *mut sixel_allocator_t, fn_malloc: sixel_malloc_t, fn_calloc: sixel_calloc_t, fn_realloc: sixel_realloc_t, fn_free: sixel_free_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_allocator_ref(allocator: *mut sixel_allocator_t); } extern "C" { pub fn sixel_allocator_unref(allocator: *mut sixel_allocator_t); } extern "C" { pub fn sixel_allocator_malloc(allocator: *mut sixel_allocator_t, n: usize) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn sixel_allocator_calloc(allocator: *mut sixel_allocator_t, nelm: usize, elsize: usize) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn sixel_allocator_realloc(allocator: *mut sixel_allocator_t, p: *mut ::std::os::raw::c_void, n: usize) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn sixel_allocator_free(allocator: *mut sixel_allocator_t, p: *mut ::std::os::raw::c_void); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sixel_output([u8; 0]); pub type sixel_output_t = sixel_output; pub type sixel_write_function = ::std::option::Option ::std::os::raw::c_int>; extern "C" { pub fn sixel_output_new(output: *mut *mut sixel_output_t, fn_write: sixel_write_function, priv_: *mut ::std::os::raw::c_void, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_output_create(fn_write: sixel_write_function, priv_: *mut ::std::os::raw::c_void) -> *mut sixel_output_t; } extern "C" { pub fn sixel_output_destroy(output: *mut sixel_output_t); } extern "C" { pub fn sixel_output_ref(output: *mut sixel_output_t); } extern "C" { pub fn sixel_output_unref(output: *mut sixel_output_t); } extern "C" { pub fn sixel_output_get_8bit_availability(output: *mut sixel_output_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_output_set_8bit_availability(output: *mut sixel_output_t, availability: ::std::os::raw::c_int); } extern "C" { pub fn sixel_output_set_gri_arg_limit(output: *mut sixel_output_t, value: ::std::os::raw::c_int); } extern "C" { pub fn sixel_output_set_penetrate_multiplexer(output: *mut sixel_output_t, penetrate: ::std::os::raw::c_int); } extern "C" { pub fn sixel_output_set_skip_dcs_envelope(output: *mut sixel_output_t, skip: ::std::os::raw::c_int); } extern "C" { pub fn sixel_output_set_palette_type(output: *mut sixel_output_t, palettetype: ::std::os::raw::c_int); } extern "C" { pub fn sixel_output_set_encode_policy(output: *mut sixel_output_t, encode_policy: ::std::os::raw::c_int); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sixel_dither([u8; 0]); pub type sixel_dither_t = sixel_dither; extern "C" { pub fn sixel_dither_new(ppdither: *mut *mut sixel_dither_t, ncolors: ::std::os::raw::c_int, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_dither_create(ncolors: ::std::os::raw::c_int) -> *mut sixel_dither_t; } extern "C" { pub fn sixel_dither_get(builtin_dither: ::std::os::raw::c_int) -> *mut sixel_dither_t; } extern "C" { pub fn sixel_dither_destroy(dither: *mut sixel_dither_t); } extern "C" { pub fn sixel_dither_ref(dither: *mut sixel_dither_t); } extern "C" { pub fn sixel_dither_unref(dither: *mut sixel_dither_t); } extern "C" { pub fn sixel_dither_initialize(dither: *mut sixel_dither_t, data: *mut ::std::os::raw::c_uchar, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int, pixelformat: ::std::os::raw::c_int, method_for_largest: ::std::os::raw::c_int, method_for_rep: ::std::os::raw::c_int, quality_mode: ::std::os::raw::c_int) -> SIXELSTATUS; } extern "C" { pub fn sixel_dither_set_diffusion_type(dither: *mut sixel_dither_t, method_for_diffuse: ::std::os::raw::c_int); } extern "C" { pub fn sixel_dither_get_num_of_palette_colors(dither: *mut sixel_dither_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_dither_get_num_of_histogram_colors(dither: *mut sixel_dither_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_dither_get_num_of_histgram_colors(dither: *mut sixel_dither_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_dither_get_palette(dither: *mut sixel_dither_t) -> *mut ::std::os::raw::c_uchar; } extern "C" { pub fn sixel_dither_set_palette(dither: *mut sixel_dither_t, palette: *mut ::std::os::raw::c_uchar); } extern "C" { pub fn sixel_dither_set_complexion_score(dither: *mut sixel_dither_t, score: ::std::os::raw::c_int); } extern "C" { pub fn sixel_dither_set_body_only(dither: *mut sixel_dither_t, bodyonly: ::std::os::raw::c_int); } extern "C" { pub fn sixel_dither_set_optimize_palette(dither: *mut sixel_dither_t, do_opt: ::std::os::raw::c_int); } extern "C" { pub fn sixel_dither_set_pixelformat(dither: *mut sixel_dither_t, pixelformat: ::std::os::raw::c_int); } extern "C" { pub fn sixel_dither_set_transparent(dither: *mut sixel_dither_t, transparent: ::std::os::raw::c_int); } pub type sixel_allocator_function = ::std::option::Option *mut ::std::os::raw::c_void>; extern "C" { pub fn sixel_encode(pixels: *mut ::std::os::raw::c_uchar, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int, depth: ::std::os::raw::c_int, dither: *mut sixel_dither_t, context: *mut sixel_output_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_decode_raw(p: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, pixels: *mut *mut ::std::os::raw::c_uchar, pwidth: *mut ::std::os::raw::c_int, pheight: *mut ::std::os::raw::c_int, palette: *mut *mut ::std::os::raw::c_uchar, ncolors: *mut ::std::os::raw::c_int, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_decode(sixels: *mut ::std::os::raw::c_uchar, size: ::std::os::raw::c_int, pixels: *mut *mut ::std::os::raw::c_uchar, pwidth: *mut ::std::os::raw::c_int, pheight: *mut ::std::os::raw::c_int, palette: *mut *mut ::std::os::raw::c_uchar, ncolors: *mut ::std::os::raw::c_int, fn_malloc: sixel_allocator_function) -> SIXELSTATUS; } extern "C" { pub fn sixel_helper_set_additional_message(message: *const ::std::os::raw::c_char); } extern "C" { pub fn sixel_helper_get_additional_message() -> *const ::std::os::raw::c_char; } extern "C" { pub fn sixel_helper_format_error(status: SIXELSTATUS) -> *const ::std::os::raw::c_char; } extern "C" { pub fn sixel_helper_compute_depth(pixelformat: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_helper_normalize_pixelformat(dst: *mut ::std::os::raw::c_uchar, dst_pixelformat: *mut ::std::os::raw::c_int, src: *const ::std::os::raw::c_uchar, src_pixelformat: ::std::os::raw::c_int, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int) -> SIXELSTATUS; } extern "C" { pub fn sixel_helper_scale_image(dst: *mut ::std::os::raw::c_uchar, src: *const ::std::os::raw::c_uchar, srcw: ::std::os::raw::c_int, srch: ::std::os::raw::c_int, pixelformat: ::std::os::raw::c_int, dstw: ::std::os::raw::c_int, dsth: ::std::os::raw::c_int, method_for_resampling: ::std::os::raw::c_int, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum imageFormat { FORMAT_GIF = 0, FORMAT_PNG = 1, FORMAT_BMP = 2, FORMAT_JPG = 3, FORMAT_TGA = 4, FORMAT_WBMP = 5, FORMAT_TIFF = 6, FORMAT_SIXEL = 7, FORMAT_PNM = 8, FORMAT_GD2 = 9, FORMAT_PSD = 10, FORMAT_HDR = 11, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum loopControl { LOOP_AUTO = 0, LOOP_FORCE = 1, LOOP_DISABLE = 2, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sixel_frame([u8; 0]); pub type sixel_frame_t = sixel_frame; extern "C" { pub fn sixel_frame_new(ppframe: *mut *mut sixel_frame_t, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_frame_create() -> *mut sixel_frame_t; } extern "C" { pub fn sixel_frame_ref(frame: *mut sixel_frame_t); } extern "C" { pub fn sixel_frame_unref(frame: *mut sixel_frame_t); } extern "C" { pub fn sixel_frame_init(frame: *mut sixel_frame_t, pixels: *mut ::std::os::raw::c_uchar, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int, pixelformat: ::std::os::raw::c_int, palette: *mut ::std::os::raw::c_uchar, ncolors: ::std::os::raw::c_int) -> SIXELSTATUS; } extern "C" { pub fn sixel_frame_get_pixels(frame: *mut sixel_frame_t) -> *mut ::std::os::raw::c_uchar; } extern "C" { pub fn sixel_frame_get_palette(frame: *mut sixel_frame_t) -> *mut ::std::os::raw::c_uchar; } extern "C" { pub fn sixel_frame_get_width(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_height(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_ncolors(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_pixelformat(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_transparent(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_multiframe(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_delay(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_frame_no(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_get_loop_no(frame: *mut sixel_frame_t) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_strip_alpha(frame: *mut sixel_frame_t, bgcolor: *mut ::std::os::raw::c_uchar) -> ::std::os::raw::c_int; } extern "C" { pub fn sixel_frame_resize(frame: *mut sixel_frame_t, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int, method_for_resampling: ::std::os::raw::c_int) -> SIXELSTATUS; } extern "C" { pub fn sixel_frame_clip(frame: *mut sixel_frame_t, x: ::std::os::raw::c_int, y: ::std::os::raw::c_int, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int) -> SIXELSTATUS; } pub type sixel_load_image_function = ::std::option::Option SIXELSTATUS>; extern "C" { pub fn sixel_helper_load_image_file(filename: *const ::std::os::raw::c_char, fstatic: ::std::os::raw::c_int, fuse_palette: ::std::os::raw::c_int, reqcolors: ::std::os::raw::c_int, bgcolor: *mut ::std::os::raw::c_uchar, loop_control: ::std::os::raw::c_int, fn_load: sixel_load_image_function, finsecure: ::std::os::raw::c_int, cancel_flag: *const ::std::os::raw::c_int, context: *mut ::std::os::raw::c_void, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_helper_write_image_file(data: *mut ::std::os::raw::c_uchar, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int, palette: *mut ::std::os::raw::c_uchar, pixelformat: ::std::os::raw::c_int, filename: *const ::std::os::raw::c_char, imageformat: ::std::os::raw::c_int, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sixel_encoder([u8; 0]); pub type sixel_encoder_t = sixel_encoder; extern "C" { pub fn sixel_encoder_new(ppencoder: *mut *mut sixel_encoder_t, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_encoder_create() -> *mut sixel_encoder_t; } extern "C" { pub fn sixel_encoder_ref(encoder: *mut sixel_encoder_t); } extern "C" { pub fn sixel_encoder_unref(encoder: *mut sixel_encoder_t); } extern "C" { pub fn sixel_encoder_set_cancel_flag(encoder: *mut sixel_encoder_t, cancel_flag: *mut ::std::os::raw::c_int) -> SIXELSTATUS; } extern "C" { pub fn sixel_encoder_setopt(encoder: *mut sixel_encoder_t, arg: ::std::os::raw::c_int, optarg: *const ::std::os::raw::c_char) -> SIXELSTATUS; } extern "C" { pub fn sixel_encoder_encode(encoder: *mut sixel_encoder_t, filename: *const ::std::os::raw::c_char) -> SIXELSTATUS; } extern "C" { pub fn sixel_encoder_encode_bytes(encoder: *mut sixel_encoder_t, // length = width * height * depth bytes: *mut ::std::os::raw::c_uchar, width: ::std::os::raw::c_int, height: ::std::os::raw::c_int, pixelformat: ::std::os::raw::c_int, palette: *mut ::std::os::raw::c_uchar, ncolors: ::std::os::raw::c_int) -> SIXELSTATUS; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sixel_decoder([u8; 0]); pub type sixel_decoder_t = sixel_decoder; extern "C" { pub fn sixel_decoder_new(ppdecoder: *mut *mut sixel_decoder_t, allocator: *mut sixel_allocator_t) -> SIXELSTATUS; } extern "C" { pub fn sixel_decoder_create() -> *mut sixel_decoder_t; } extern "C" { pub fn sixel_decoder_ref(decoder: *mut sixel_decoder_t); } extern "C" { pub fn sixel_decoder_unref(decoder: *mut sixel_decoder_t); } extern "C" { pub fn sixel_decoder_setopt(decoder: *mut sixel_decoder_t, arg: ::std::os::raw::c_int, optarg: *const ::std::os::raw::c_char) -> SIXELSTATUS; } extern "C" { pub fn sixel_decoder_decode(decoder: *mut sixel_decoder_t) -> SIXELSTATUS; }