/* automatically generated by rust-bindgen */ #![allow(dead_code)] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct slop_options { pub quiet: ::std::os::raw::c_int, pub border: f32, pub padding: f32, pub tolerance: f32, pub highlight: ::std::os::raw::c_int, pub noopengl: ::std::os::raw::c_int, pub nokeyboard: ::std::os::raw::c_int, pub nodecorations: ::std::os::raw::c_int, pub shaders: *mut ::std::os::raw::c_char, pub r: f32, pub g: f32, pub b: f32, pub a: f32, pub xdisplay: *const ::std::os::raw::c_char, } #[test] fn bindgen_test_layout_slop_options() { assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(slop_options)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(slop_options)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).quiet as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(quiet) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).border as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(border) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).padding as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(padding) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).tolerance as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(tolerance) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).highlight as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(highlight) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).noopengl as *const _ as usize }, 20usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(noopengl) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).nokeyboard as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(nokeyboard) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).nodecorations as *const _ as usize }, 28usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(nodecorations) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).shaders as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(shaders) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).r as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(r) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).g as *const _ as usize }, 44usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(g) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, 48usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(b) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, 52usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(a) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).xdisplay as *const _ as usize }, 56usize, concat!( "Offset of field: ", stringify!(slop_options), "::", stringify!(xdisplay) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct slop_selection { pub cancelled: ::std::os::raw::c_int, pub x: f32, pub y: f32, pub w: f32, pub h: f32, pub id: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_slop_selection() { assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(slop_selection)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(slop_selection)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).cancelled as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(slop_selection), "::", stringify!(cancelled) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(slop_selection), "::", stringify!(x) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(slop_selection), "::", stringify!(y) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(slop_selection), "::", stringify!(w) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).h as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(slop_selection), "::", stringify!(h) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, 20usize, concat!( "Offset of field: ", stringify!(slop_selection), "::", stringify!(id) ) ); } extern "C" { pub fn slop_options_default() -> slop_options; } extern "C" { pub fn slop_select(options: *mut slop_options) -> slop_selection; }