/* automatically generated by rust-bindgen 0.71.1 */

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_position {
    pub x: f32,
    pub y: f32,
    pub width: f32,
    pub height: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_position"][::std::mem::size_of::<lh_position>() - 16usize];
    ["Alignment of lh_position"][::std::mem::align_of::<lh_position>() - 4usize];
    ["Offset of field: lh_position::x"][::std::mem::offset_of!(lh_position, x) - 0usize];
    ["Offset of field: lh_position::y"][::std::mem::offset_of!(lh_position, y) - 4usize];
    ["Offset of field: lh_position::width"][::std::mem::offset_of!(lh_position, width) - 8usize];
    ["Offset of field: lh_position::height"][::std::mem::offset_of!(lh_position, height) - 12usize];
};
pub type lh_position_t = lh_position;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_size {
    pub width: f32,
    pub height: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_size"][::std::mem::size_of::<lh_size>() - 8usize];
    ["Alignment of lh_size"][::std::mem::align_of::<lh_size>() - 4usize];
    ["Offset of field: lh_size::width"][::std::mem::offset_of!(lh_size, width) - 0usize];
    ["Offset of field: lh_size::height"][::std::mem::offset_of!(lh_size, height) - 4usize];
};
pub type lh_size_t = lh_size;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_web_color {
    pub red: ::std::os::raw::c_uchar,
    pub green: ::std::os::raw::c_uchar,
    pub blue: ::std::os::raw::c_uchar,
    pub alpha: ::std::os::raw::c_uchar,
    pub is_current_color: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_web_color"][::std::mem::size_of::<lh_web_color>() - 8usize];
    ["Alignment of lh_web_color"][::std::mem::align_of::<lh_web_color>() - 4usize];
    ["Offset of field: lh_web_color::red"][::std::mem::offset_of!(lh_web_color, red) - 0usize];
    ["Offset of field: lh_web_color::green"][::std::mem::offset_of!(lh_web_color, green) - 1usize];
    ["Offset of field: lh_web_color::blue"][::std::mem::offset_of!(lh_web_color, blue) - 2usize];
    ["Offset of field: lh_web_color::alpha"][::std::mem::offset_of!(lh_web_color, alpha) - 3usize];
    ["Offset of field: lh_web_color::is_current_color"]
        [::std::mem::offset_of!(lh_web_color, is_current_color) - 4usize];
};
pub type lh_web_color_t = lh_web_color;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_font_metrics {
    pub font_size: f32,
    pub height: f32,
    pub ascent: f32,
    pub descent: f32,
    pub x_height: f32,
    pub ch_width: f32,
    pub draw_spaces: ::std::os::raw::c_int,
    pub sub_shift: f32,
    pub super_shift: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_font_metrics"][::std::mem::size_of::<lh_font_metrics>() - 36usize];
    ["Alignment of lh_font_metrics"][::std::mem::align_of::<lh_font_metrics>() - 4usize];
    ["Offset of field: lh_font_metrics::font_size"]
        [::std::mem::offset_of!(lh_font_metrics, font_size) - 0usize];
    ["Offset of field: lh_font_metrics::height"]
        [::std::mem::offset_of!(lh_font_metrics, height) - 4usize];
    ["Offset of field: lh_font_metrics::ascent"]
        [::std::mem::offset_of!(lh_font_metrics, ascent) - 8usize];
    ["Offset of field: lh_font_metrics::descent"]
        [::std::mem::offset_of!(lh_font_metrics, descent) - 12usize];
    ["Offset of field: lh_font_metrics::x_height"]
        [::std::mem::offset_of!(lh_font_metrics, x_height) - 16usize];
    ["Offset of field: lh_font_metrics::ch_width"]
        [::std::mem::offset_of!(lh_font_metrics, ch_width) - 20usize];
    ["Offset of field: lh_font_metrics::draw_spaces"]
        [::std::mem::offset_of!(lh_font_metrics, draw_spaces) - 24usize];
    ["Offset of field: lh_font_metrics::sub_shift"]
        [::std::mem::offset_of!(lh_font_metrics, sub_shift) - 28usize];
    ["Offset of field: lh_font_metrics::super_shift"]
        [::std::mem::offset_of!(lh_font_metrics, super_shift) - 32usize];
};
pub type lh_font_metrics_t = lh_font_metrics;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_border_radiuses {
    pub top_left_x: f32,
    pub top_left_y: f32,
    pub top_right_x: f32,
    pub top_right_y: f32,
    pub bottom_right_x: f32,
    pub bottom_right_y: f32,
    pub bottom_left_x: f32,
    pub bottom_left_y: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_border_radiuses"][::std::mem::size_of::<lh_border_radiuses>() - 32usize];
    ["Alignment of lh_border_radiuses"][::std::mem::align_of::<lh_border_radiuses>() - 4usize];
    ["Offset of field: lh_border_radiuses::top_left_x"]
        [::std::mem::offset_of!(lh_border_radiuses, top_left_x) - 0usize];
    ["Offset of field: lh_border_radiuses::top_left_y"]
        [::std::mem::offset_of!(lh_border_radiuses, top_left_y) - 4usize];
    ["Offset of field: lh_border_radiuses::top_right_x"]
        [::std::mem::offset_of!(lh_border_radiuses, top_right_x) - 8usize];
    ["Offset of field: lh_border_radiuses::top_right_y"]
        [::std::mem::offset_of!(lh_border_radiuses, top_right_y) - 12usize];
    ["Offset of field: lh_border_radiuses::bottom_right_x"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_right_x) - 16usize];
    ["Offset of field: lh_border_radiuses::bottom_right_y"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_right_y) - 20usize];
    ["Offset of field: lh_border_radiuses::bottom_left_x"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_left_x) - 24usize];
    ["Offset of field: lh_border_radiuses::bottom_left_y"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_left_y) - 28usize];
};
pub type lh_border_radiuses_t = lh_border_radiuses;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_border {
    pub width: f32,
    pub style: ::std::os::raw::c_int,
    pub color: lh_web_color_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_border"][::std::mem::size_of::<lh_border>() - 16usize];
    ["Alignment of lh_border"][::std::mem::align_of::<lh_border>() - 4usize];
    ["Offset of field: lh_border::width"][::std::mem::offset_of!(lh_border, width) - 0usize];
    ["Offset of field: lh_border::style"][::std::mem::offset_of!(lh_border, style) - 4usize];
    ["Offset of field: lh_border::color"][::std::mem::offset_of!(lh_border, color) - 8usize];
};
pub type lh_border_t = lh_border;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_borders {
    pub left: lh_border_t,
    pub top: lh_border_t,
    pub right: lh_border_t,
    pub bottom: lh_border_t,
    pub radius: lh_border_radiuses_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_borders"][::std::mem::size_of::<lh_borders>() - 96usize];
    ["Alignment of lh_borders"][::std::mem::align_of::<lh_borders>() - 4usize];
    ["Offset of field: lh_borders::left"][::std::mem::offset_of!(lh_borders, left) - 0usize];
    ["Offset of field: lh_borders::top"][::std::mem::offset_of!(lh_borders, top) - 16usize];
    ["Offset of field: lh_borders::right"][::std::mem::offset_of!(lh_borders, right) - 32usize];
    ["Offset of field: lh_borders::bottom"][::std::mem::offset_of!(lh_borders, bottom) - 48usize];
    ["Offset of field: lh_borders::radius"][::std::mem::offset_of!(lh_borders, radius) - 64usize];
};
pub type lh_borders_t = lh_borders;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_media_features {
    pub type_: ::std::os::raw::c_int,
    pub width: f32,
    pub height: f32,
    pub device_width: f32,
    pub device_height: f32,
    pub color: ::std::os::raw::c_int,
    pub color_index: ::std::os::raw::c_int,
    pub monochrome: ::std::os::raw::c_int,
    pub resolution: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_media_features"][::std::mem::size_of::<lh_media_features>() - 36usize];
    ["Alignment of lh_media_features"][::std::mem::align_of::<lh_media_features>() - 4usize];
    ["Offset of field: lh_media_features::type_"]
        [::std::mem::offset_of!(lh_media_features, type_) - 0usize];
    ["Offset of field: lh_media_features::width"]
        [::std::mem::offset_of!(lh_media_features, width) - 4usize];
    ["Offset of field: lh_media_features::height"]
        [::std::mem::offset_of!(lh_media_features, height) - 8usize];
    ["Offset of field: lh_media_features::device_width"]
        [::std::mem::offset_of!(lh_media_features, device_width) - 12usize];
    ["Offset of field: lh_media_features::device_height"]
        [::std::mem::offset_of!(lh_media_features, device_height) - 16usize];
    ["Offset of field: lh_media_features::color"]
        [::std::mem::offset_of!(lh_media_features, color) - 20usize];
    ["Offset of field: lh_media_features::color_index"]
        [::std::mem::offset_of!(lh_media_features, color_index) - 24usize];
    ["Offset of field: lh_media_features::monochrome"]
        [::std::mem::offset_of!(lh_media_features, monochrome) - 28usize];
    ["Offset of field: lh_media_features::resolution"]
        [::std::mem::offset_of!(lh_media_features, resolution) - 32usize];
};
pub type lh_media_features_t = lh_media_features;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_point {
    pub x: f32,
    pub y: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_point"][::std::mem::size_of::<lh_point>() - 8usize];
    ["Alignment of lh_point"][::std::mem::align_of::<lh_point>() - 4usize];
    ["Offset of field: lh_point::x"][::std::mem::offset_of!(lh_point, x) - 0usize];
    ["Offset of field: lh_point::y"][::std::mem::offset_of!(lh_point, y) - 4usize];
};
pub type lh_point_t = lh_point;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_document {
    _unused: [u8; 0],
}
pub type lh_document_t = lh_document;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_background_layer {
    _unused: [u8; 0],
}
pub type lh_background_layer_t = lh_background_layer;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_linear_gradient {
    _unused: [u8; 0],
}
pub type lh_linear_gradient_t = lh_linear_gradient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_radial_gradient {
    _unused: [u8; 0],
}
pub type lh_radial_gradient_t = lh_radial_gradient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_conic_gradient {
    _unused: [u8; 0],
}
pub type lh_conic_gradient_t = lh_conic_gradient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_font_description {
    _unused: [u8; 0],
}
pub type lh_font_description_t = lh_font_description;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_list_marker {
    _unused: [u8; 0],
}
pub type lh_list_marker_t = lh_list_marker;
unsafe extern "C" {
    pub fn lh_font_description_family(
        fd: *const lh_font_description_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_font_description_size(fd: *const lh_font_description_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_font_description_style(fd: *const lh_font_description_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_weight(fd: *const lh_font_description_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_line(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_thickness_is_predefined(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_thickness_predef(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_thickness_value(fd: *const lh_font_description_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_style(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_color(fd: *const lh_font_description_t)
        -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_font_description_emphasis_style(
        fd: *const lh_font_description_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_font_description_emphasis_color(fd: *const lh_font_description_t) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_font_description_emphasis_position(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_list_marker_image(m: *const lh_list_marker_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_list_marker_baseurl(m: *const lh_list_marker_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_list_marker_type(m: *const lh_list_marker_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_list_marker_color(m: *const lh_list_marker_t) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_list_marker_pos(m: *const lh_list_marker_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_list_marker_index(m: *const lh_list_marker_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_list_marker_font(m: *const lh_list_marker_t) -> usize;
}
unsafe extern "C" {
    pub fn lh_background_layer_border_box(layer: *const lh_background_layer_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_border_radius(
        layer: *const lh_background_layer_t,
    ) -> lh_border_radiuses_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_clip_box(layer: *const lh_background_layer_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_origin_box(layer: *const lh_background_layer_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_attachment(
        layer: *const lh_background_layer_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_background_layer_repeat(layer: *const lh_background_layer_t)
        -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_background_layer_is_root(
        layer: *const lh_background_layer_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_start(g: *const lh_linear_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_end(g: *const lh_linear_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_points_count(
        g: *const lh_linear_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_point_offset(
        g: *const lh_linear_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> f32;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_point_color(
        g: *const lh_linear_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_space(g: *const lh_linear_gradient_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_hue_interpolation(
        g: *const lh_linear_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_position(g: *const lh_radial_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_radius(g: *const lh_radial_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_points_count(
        g: *const lh_radial_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_point_offset(
        g: *const lh_radial_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> f32;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_point_color(
        g: *const lh_radial_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_space(g: *const lh_radial_gradient_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_hue_interpolation(
        g: *const lh_radial_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_position(g: *const lh_conic_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_angle(g: *const lh_conic_gradient_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_radius(g: *const lh_conic_gradient_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_points_count(
        g: *const lh_conic_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_point_offset(
        g: *const lh_conic_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> f32;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_point_color(
        g: *const lh_conic_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_space(g: *const lh_conic_gradient_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_hue_interpolation(
        g: *const lh_conic_gradient_t,
    ) -> ::std::os::raw::c_int;
}
pub type lh_set_string_fn = ::std::option::Option<
    unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, text: *const ::std::os::raw::c_char),
>;
pub type lh_set_language_fn = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut ::std::os::raw::c_void,
        language: *const ::std::os::raw::c_char,
        culture: *const ::std::os::raw::c_char,
    ),
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_container_vtable {
    pub create_font: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            descr: *const lh_font_description_t,
            fm: *mut lh_font_metrics_t,
        ) -> usize,
    >,
    pub delete_font: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, hFont: usize),
    >,
    pub text_width: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            text: *const ::std::os::raw::c_char,
            hFont: usize,
        ) -> f32,
    >,
    pub draw_text: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            text: *const ::std::os::raw::c_char,
            hFont: usize,
            color: lh_web_color_t,
            pos: lh_position_t,
        ),
    >,
    pub pt_to_px: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, pt: f32) -> f32,
    >,
    pub get_default_font_size:
        ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> f32>,
    pub get_default_font_name: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
        ) -> *const ::std::os::raw::c_char,
    >,
    pub draw_list_marker: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            marker: *const lh_list_marker_t,
        ),
    >,
    pub load_image: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            src: *const ::std::os::raw::c_char,
            baseurl: *const ::std::os::raw::c_char,
            redraw_on_ready: ::std::os::raw::c_int,
        ),
    >,
    pub get_image_size: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            src: *const ::std::os::raw::c_char,
            baseurl: *const ::std::os::raw::c_char,
            sz: *mut lh_size_t,
        ),
    >,
    pub draw_image: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            url: *const ::std::os::raw::c_char,
            base_url: *const ::std::os::raw::c_char,
        ),
    >,
    pub draw_solid_fill: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            color: lh_web_color_t,
        ),
    >,
    pub draw_linear_gradient: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            gradient: *const lh_linear_gradient_t,
        ),
    >,
    pub draw_radial_gradient: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            gradient: *const lh_radial_gradient_t,
        ),
    >,
    pub draw_conic_gradient: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            gradient: *const lh_conic_gradient_t,
        ),
    >,
    pub draw_borders: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            borders: lh_borders_t,
            draw_pos: lh_position_t,
            root: ::std::os::raw::c_int,
        ),
    >,
    pub set_caption: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            caption: *const ::std::os::raw::c_char,
        ),
    >,
    pub set_base_url: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            base_url: *const ::std::os::raw::c_char,
        ),
    >,
    pub link: ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>,
    pub on_anchor_click: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            url: *const ::std::os::raw::c_char,
        ),
    >,
    pub on_mouse_event: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, event: ::std::os::raw::c_int),
    >,
    pub set_cursor: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            cursor: *const ::std::os::raw::c_char,
        ),
    >,
    pub transform_text: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            text: *const ::std::os::raw::c_char,
            tt: ::std::os::raw::c_int,
            set_result: lh_set_string_fn,
            ctx: *mut ::std::os::raw::c_void,
        ),
    >,
    pub import_css: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            url: *const ::std::os::raw::c_char,
            baseurl: *const ::std::os::raw::c_char,
            set_result: lh_set_string_fn,
            result_ctx: *mut ::std::os::raw::c_void,
            set_baseurl: lh_set_string_fn,
            baseurl_ctx: *mut ::std::os::raw::c_void,
        ),
    >,
    pub set_clip: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            pos: lh_position_t,
            bdr_radius: lh_border_radiuses_t,
        ),
    >,
    pub del_clip:
        ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>,
    pub get_viewport: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, viewport: *mut lh_position_t),
    >,
    pub get_media_features: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            media: *mut lh_media_features_t,
        ),
    >,
    pub get_language: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            set_result: lh_set_language_fn,
            ctx: *mut ::std::os::raw::c_void,
        ),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_container_vtable"][::std::mem::size_of::<lh_container_vtable>() - 232usize];
    ["Alignment of lh_container_vtable"][::std::mem::align_of::<lh_container_vtable>() - 8usize];
    ["Offset of field: lh_container_vtable::create_font"]
        [::std::mem::offset_of!(lh_container_vtable, create_font) - 0usize];
    ["Offset of field: lh_container_vtable::delete_font"]
        [::std::mem::offset_of!(lh_container_vtable, delete_font) - 8usize];
    ["Offset of field: lh_container_vtable::text_width"]
        [::std::mem::offset_of!(lh_container_vtable, text_width) - 16usize];
    ["Offset of field: lh_container_vtable::draw_text"]
        [::std::mem::offset_of!(lh_container_vtable, draw_text) - 24usize];
    ["Offset of field: lh_container_vtable::pt_to_px"]
        [::std::mem::offset_of!(lh_container_vtable, pt_to_px) - 32usize];
    ["Offset of field: lh_container_vtable::get_default_font_size"]
        [::std::mem::offset_of!(lh_container_vtable, get_default_font_size) - 40usize];
    ["Offset of field: lh_container_vtable::get_default_font_name"]
        [::std::mem::offset_of!(lh_container_vtable, get_default_font_name) - 48usize];
    ["Offset of field: lh_container_vtable::draw_list_marker"]
        [::std::mem::offset_of!(lh_container_vtable, draw_list_marker) - 56usize];
    ["Offset of field: lh_container_vtable::load_image"]
        [::std::mem::offset_of!(lh_container_vtable, load_image) - 64usize];
    ["Offset of field: lh_container_vtable::get_image_size"]
        [::std::mem::offset_of!(lh_container_vtable, get_image_size) - 72usize];
    ["Offset of field: lh_container_vtable::draw_image"]
        [::std::mem::offset_of!(lh_container_vtable, draw_image) - 80usize];
    ["Offset of field: lh_container_vtable::draw_solid_fill"]
        [::std::mem::offset_of!(lh_container_vtable, draw_solid_fill) - 88usize];
    ["Offset of field: lh_container_vtable::draw_linear_gradient"]
        [::std::mem::offset_of!(lh_container_vtable, draw_linear_gradient) - 96usize];
    ["Offset of field: lh_container_vtable::draw_radial_gradient"]
        [::std::mem::offset_of!(lh_container_vtable, draw_radial_gradient) - 104usize];
    ["Offset of field: lh_container_vtable::draw_conic_gradient"]
        [::std::mem::offset_of!(lh_container_vtable, draw_conic_gradient) - 112usize];
    ["Offset of field: lh_container_vtable::draw_borders"]
        [::std::mem::offset_of!(lh_container_vtable, draw_borders) - 120usize];
    ["Offset of field: lh_container_vtable::set_caption"]
        [::std::mem::offset_of!(lh_container_vtable, set_caption) - 128usize];
    ["Offset of field: lh_container_vtable::set_base_url"]
        [::std::mem::offset_of!(lh_container_vtable, set_base_url) - 136usize];
    ["Offset of field: lh_container_vtable::link"]
        [::std::mem::offset_of!(lh_container_vtable, link) - 144usize];
    ["Offset of field: lh_container_vtable::on_anchor_click"]
        [::std::mem::offset_of!(lh_container_vtable, on_anchor_click) - 152usize];
    ["Offset of field: lh_container_vtable::on_mouse_event"]
        [::std::mem::offset_of!(lh_container_vtable, on_mouse_event) - 160usize];
    ["Offset of field: lh_container_vtable::set_cursor"]
        [::std::mem::offset_of!(lh_container_vtable, set_cursor) - 168usize];
    ["Offset of field: lh_container_vtable::transform_text"]
        [::std::mem::offset_of!(lh_container_vtable, transform_text) - 176usize];
    ["Offset of field: lh_container_vtable::import_css"]
        [::std::mem::offset_of!(lh_container_vtable, import_css) - 184usize];
    ["Offset of field: lh_container_vtable::set_clip"]
        [::std::mem::offset_of!(lh_container_vtable, set_clip) - 192usize];
    ["Offset of field: lh_container_vtable::del_clip"]
        [::std::mem::offset_of!(lh_container_vtable, del_clip) - 200usize];
    ["Offset of field: lh_container_vtable::get_viewport"]
        [::std::mem::offset_of!(lh_container_vtable, get_viewport) - 208usize];
    ["Offset of field: lh_container_vtable::get_media_features"]
        [::std::mem::offset_of!(lh_container_vtable, get_media_features) - 216usize];
    ["Offset of field: lh_container_vtable::get_language"]
        [::std::mem::offset_of!(lh_container_vtable, get_language) - 224usize];
};
pub type lh_container_vtable_t = lh_container_vtable;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_element {
    _unused: [u8; 0],
}
pub type lh_element_t = lh_element;
unsafe extern "C" {
    pub fn lh_document_create_from_string(
        html: *const ::std::os::raw::c_char,
        vtable: *mut lh_container_vtable_t,
        user_data: *mut ::std::os::raw::c_void,
        master_css: *const ::std::os::raw::c_char,
        user_styles: *const ::std::os::raw::c_char,
    ) -> *mut lh_document_t;
}
unsafe extern "C" {
    pub fn lh_document_destroy(doc: *mut lh_document_t);
}
unsafe extern "C" {
    pub fn lh_document_render(doc: *mut lh_document_t, max_width: f32) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_draw(
        doc: *mut lh_document_t,
        hdc: usize,
        x: f32,
        y: f32,
        clip: *const lh_position_t,
    );
}
unsafe extern "C" {
    pub fn lh_document_width(doc: *const lh_document_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_height(doc: *const lh_document_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_add_stylesheet(
        doc: *mut lh_document_t,
        css_text: *const ::std::os::raw::c_char,
        baseurl: *const ::std::os::raw::c_char,
        media: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn lh_document_root(doc: *mut lh_document_t) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_parent(el: *mut lh_element_t) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_children_count(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_child_at(
        el: *mut lh_element_t,
        index: ::std::os::raw::c_int,
    ) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_is_text(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_get_font(el: *mut lh_element_t) -> usize;
}
unsafe extern "C" {
    pub fn lh_element_get_font_size(el: *mut lh_element_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_element_get_placement(el: *mut lh_element_t, pos: *mut lh_position_t);
}
unsafe extern "C" {
    pub fn lh_element_get_text(
        el: *mut lh_element_t,
        cb: ::std::option::Option<
            unsafe extern "C" fn(
                ctx: *mut ::std::os::raw::c_void,
                text: *const ::std::os::raw::c_char,
            ),
        >,
        ctx: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn lh_document_get_element_by_point(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_get_inline_boxes_count(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_get_inline_box_at(
        el: *mut lh_element_t,
        index: ::std::os::raw::c_int,
        pos: *mut lh_position_t,
    );
}
pub type lh_inline_box_callback = ::std::option::Option<
    unsafe extern "C" fn(pos: *const lh_position_t, ctx: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
    pub fn lh_element_get_inline_boxes(
        el: *mut lh_element_t,
        cb: lh_inline_box_callback,
        ctx: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn lh_element_select_one(
        el: *mut lh_element_t,
        selector: *const ::std::os::raw::c_char,
    ) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_get_text_align(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_get_line_height(el: *mut lh_element_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_append_children_from_string(
        doc: *mut lh_document_t,
        parent: *mut lh_element_t,
        html: *const ::std::os::raw::c_char,
        replace_existing: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    pub fn lh_document_on_mouse_over(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_on_lbutton_down(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_on_lbutton_up(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_on_mouse_leave(doc: *mut lh_document_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_media_changed(doc: *mut lh_document_t) -> ::std::os::raw::c_int;
}
