/* automatically generated by rust-bindgen 0.68.1 */

pub const di_cvt_reduced_blanking_version_DI_CVT_REDUCED_BLANKING_NONE:
    di_cvt_reduced_blanking_version = 0;
pub const di_cvt_reduced_blanking_version_DI_CVT_REDUCED_BLANKING_V1:
    di_cvt_reduced_blanking_version = 1;
pub const di_cvt_reduced_blanking_version_DI_CVT_REDUCED_BLANKING_V2:
    di_cvt_reduced_blanking_version = 2;
pub const di_cvt_reduced_blanking_version_DI_CVT_REDUCED_BLANKING_V3:
    di_cvt_reduced_blanking_version = 3;
pub type di_cvt_reduced_blanking_version = ::std::os::raw::c_uint;
#[doc = " Input parameters, defined in table 3-1."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct di_cvt_options {
    pub red_blank_ver: di_cvt_reduced_blanking_version,
    pub h_pixels: i32,
    pub v_lines: i32,
    pub ip_freq_rqd: f64,
    pub video_opt: bool,
    pub vblank: f64,
    pub additional_hblank: i32,
    pub early_vsync_rqd: bool,
    pub int_rqd: bool,
    pub margins_rqd: bool,
}
#[test]
fn bindgen_test_layout_di_cvt_options() {
    const UNINIT: ::std::mem::MaybeUninit<di_cvt_options> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<di_cvt_options>(),
        48usize,
        concat!("Size of: ", stringify!(di_cvt_options))
    );
    assert_eq!(
        ::std::mem::align_of::<di_cvt_options>(),
        8usize,
        concat!("Alignment of ", stringify!(di_cvt_options))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).red_blank_ver) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(red_blank_ver)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).h_pixels) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(h_pixels)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).v_lines) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(v_lines)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ip_freq_rqd) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(ip_freq_rqd)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).video_opt) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(video_opt)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).vblank) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(vblank)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).additional_hblank) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(additional_hblank)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).early_vsync_rqd) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(early_vsync_rqd)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).int_rqd) as usize - ptr as usize },
        45usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(int_rqd)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).margins_rqd) as usize - ptr as usize },
        46usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_options),
            "::",
            stringify!(margins_rqd)
        )
    );
}
#[doc = " Output parameters, defined in table 3-4."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct di_cvt_timing {
    pub act_pixel_freq: f64,
    pub total_active_pixels: f64,
    pub v_lines_rnd: f64,
    pub h_front_porch: f64,
    pub h_sync: f64,
    pub h_back_porch: f64,
    pub v_front_porch: f64,
    pub v_sync: f64,
    pub v_back_porch: f64,
    pub act_frame_rate: f64,
}
#[test]
fn bindgen_test_layout_di_cvt_timing() {
    const UNINIT: ::std::mem::MaybeUninit<di_cvt_timing> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<di_cvt_timing>(),
        80usize,
        concat!("Size of: ", stringify!(di_cvt_timing))
    );
    assert_eq!(
        ::std::mem::align_of::<di_cvt_timing>(),
        8usize,
        concat!("Alignment of ", stringify!(di_cvt_timing))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).act_pixel_freq) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(act_pixel_freq)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).total_active_pixels) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(total_active_pixels)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).v_lines_rnd) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(v_lines_rnd)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).h_front_porch) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(h_front_porch)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).h_sync) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(h_sync)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).h_back_porch) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(h_back_porch)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).v_front_porch) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(v_front_porch)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).v_sync) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(v_sync)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).v_back_porch) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(v_back_porch)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).act_frame_rate) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(di_cvt_timing),
            "::",
            stringify!(act_frame_rate)
        )
    );
}
extern "C" {
    #[doc = " Compute a timing via the CVT formula."]
    pub fn di_cvt_compute(t: *mut di_cvt_timing, options: *const di_cvt_options);
}
