Current section

Files

Jump to
elxvips native lvips lib bindings.rs
Raw

native/lvips/lib/bindings.rs

/* automatically generated by rust-bindgen */
pub type size_t = ::std::os::raw::c_ulong;
pub type guint32 = ::std::os::raw::c_uint;
pub type gint64 = ::std::os::raw::c_long;
pub type gsize = ::std::os::raw::c_ulong;
pub type gint = ::std::os::raw::c_int;
pub type gboolean = gint;
pub type guint = ::std::os::raw::c_uint;
pub type gpointer = *mut ::std::os::raw::c_void;
pub type GThreadFunc = ::std::option::Option<unsafe extern "C" fn(data: gpointer) -> gpointer>;
pub type GThread = _GThread;
pub type GMutex = _GMutex;
#[repr(C)]
#[derive(Copy, Clone)]
pub union _GMutex {
pub p: gpointer,
pub i: [guint; 2usize],
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout__GMutex() {
assert_eq!(
::std::mem::size_of::<_GMutex>(),
8usize,
concat!("Size of: ", stringify!(_GMutex))
);
assert_eq!(
::std::mem::align_of::<_GMutex>(),
8usize,
concat!("Alignment of ", stringify!(_GMutex))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GMutex>())).p as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GMutex),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GMutex>())).i as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GMutex),
"::",
stringify!(i)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GData {
_unused: [u8; 0],
}
pub type GData = _GData;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GHashTable {
_unused: [u8; 0],
}
pub type GHashTable = _GHashTable;
pub type GSList = _GSList;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GSList {
pub data: gpointer,
pub next: *mut GSList,
}
#[test]
fn bindgen_test_layout__GSList() {
assert_eq!(
::std::mem::size_of::<_GSList>(),
16usize,
concat!("Size of: ", stringify!(_GSList))
);
assert_eq!(
::std::mem::align_of::<_GSList>(),
8usize,
concat!("Alignment of ", stringify!(_GSList))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GSList>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GSList),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GSList>())).next as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_GSList),
"::",
stringify!(next)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GTimer {
_unused: [u8; 0],
}
pub type GTimer = _GTimer;
pub const GThreadPriority_G_THREAD_PRIORITY_LOW: GThreadPriority = 0;
pub const GThreadPriority_G_THREAD_PRIORITY_NORMAL: GThreadPriority = 1;
pub const GThreadPriority_G_THREAD_PRIORITY_HIGH: GThreadPriority = 2;
pub const GThreadPriority_G_THREAD_PRIORITY_URGENT: GThreadPriority = 3;
pub type GThreadPriority = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GThread {
pub func: GThreadFunc,
pub data: gpointer,
pub joinable: gboolean,
pub priority: GThreadPriority,
}
#[test]
fn bindgen_test_layout__GThread() {
assert_eq!(
::std::mem::size_of::<_GThread>(),
24usize,
concat!("Size of: ", stringify!(_GThread))
);
assert_eq!(
::std::mem::align_of::<_GThread>(),
8usize,
concat!("Alignment of ", stringify!(_GThread))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GThread>())).func as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GThread),
"::",
stringify!(func)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GThread>())).data as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_GThread),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GThread>())).joinable as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_GThread),
"::",
stringify!(joinable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GThread>())).priority as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_GThread),
"::",
stringify!(priority)
)
);
}
pub type GType = gsize;
pub type GTypeClass = _GTypeClass;
pub type GTypeInstance = _GTypeInstance;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GTypeClass {
pub g_type: GType,
}
#[test]
fn bindgen_test_layout__GTypeClass() {
assert_eq!(
::std::mem::size_of::<_GTypeClass>(),
8usize,
concat!("Size of: ", stringify!(_GTypeClass))
);
assert_eq!(
::std::mem::align_of::<_GTypeClass>(),
8usize,
concat!("Alignment of ", stringify!(_GTypeClass))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GTypeClass>())).g_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GTypeClass),
"::",
stringify!(g_type)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GTypeInstance {
pub g_class: *mut GTypeClass,
}
#[test]
fn bindgen_test_layout__GTypeInstance() {
assert_eq!(
::std::mem::size_of::<_GTypeInstance>(),
8usize,
concat!("Size of: ", stringify!(_GTypeInstance))
);
assert_eq!(
::std::mem::align_of::<_GTypeInstance>(),
8usize,
concat!("Alignment of ", stringify!(_GTypeInstance))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GTypeInstance>())).g_class as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GTypeInstance),
"::",
stringify!(g_class)
)
);
}
pub type GObject = _GObject;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GObject {
pub g_type_instance: GTypeInstance,
pub ref_count: guint,
pub qdata: *mut GData,
}
#[test]
fn bindgen_test_layout__GObject() {
assert_eq!(
::std::mem::size_of::<_GObject>(),
24usize,
concat!("Size of: ", stringify!(_GObject))
);
assert_eq!(
::std::mem::align_of::<_GObject>(),
8usize,
concat!("Alignment of ", stringify!(_GObject))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GObject>())).g_type_instance as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_GObject),
"::",
stringify!(g_type_instance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GObject>())).ref_count as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_GObject),
"::",
stringify!(ref_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_GObject>())).qdata as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_GObject),
"::",
stringify!(qdata)
)
);
}
pub type VipsPel = ::std::os::raw::c_uchar;
pub type VipsCallbackFn = ::std::option::Option<
unsafe extern "C" fn(
a: *mut ::std::os::raw::c_void,
b: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type VipsImage = _VipsImage;
pub type VipsObject = _VipsObject;
pub type VipsArgumentTable = GHashTable;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsObject {
pub parent_instance: GObject,
pub constructed: gboolean,
pub static_object: gboolean,
pub argument_table: *mut VipsArgumentTable,
pub nickname: *mut ::std::os::raw::c_char,
pub description: *mut ::std::os::raw::c_char,
pub preclose: gboolean,
pub close: gboolean,
pub postclose: gboolean,
pub local_memory: size_t,
}
#[test]
fn bindgen_test_layout__VipsObject() {
assert_eq!(
::std::mem::size_of::<_VipsObject>(),
80usize,
concat!("Size of: ", stringify!(_VipsObject))
);
assert_eq!(
::std::mem::align_of::<_VipsObject>(),
8usize,
concat!("Alignment of ", stringify!(_VipsObject))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).parent_instance as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(parent_instance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).constructed as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(constructed)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).static_object as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(static_object)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).argument_table as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(argument_table)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).nickname as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(nickname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).description as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(description)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).preclose as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(preclose)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).close as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(close)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).postclose as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(postclose)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsObject>())).local_memory as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_VipsObject),
"::",
stringify!(local_memory)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsArea {
pub data: *mut ::std::os::raw::c_void,
pub length: size_t,
pub n: ::std::os::raw::c_int,
pub count: ::std::os::raw::c_int,
pub lock: *mut GMutex,
pub free_fn: VipsCallbackFn,
pub client: *mut ::std::os::raw::c_void,
pub type_: GType,
pub sizeof_type: size_t,
}
#[test]
fn bindgen_test_layout__VipsArea() {
assert_eq!(
::std::mem::size_of::<_VipsArea>(),
64usize,
concat!("Size of: ", stringify!(_VipsArea))
);
assert_eq!(
::std::mem::align_of::<_VipsArea>(),
8usize,
concat!("Alignment of ", stringify!(_VipsArea))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).length as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).n as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).count as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).lock as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).free_fn as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(free_fn)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).client as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(client)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).type_ as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArea>())).sizeof_type as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_VipsArea),
"::",
stringify!(sizeof_type)
)
);
}
pub type VipsArea = _VipsArea;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsArrayDouble {
pub area: VipsArea,
}
#[test]
fn bindgen_test_layout__VipsArrayDouble() {
assert_eq!(
::std::mem::size_of::<_VipsArrayDouble>(),
64usize,
concat!("Size of: ", stringify!(_VipsArrayDouble))
);
assert_eq!(
::std::mem::align_of::<_VipsArrayDouble>(),
8usize,
concat!("Alignment of ", stringify!(_VipsArrayDouble))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsArrayDouble>())).area as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsArrayDouble),
"::",
stringify!(area)
)
);
}
pub type VipsArrayDouble = _VipsArrayDouble;
extern "C" {
pub fn vips_array_double_new(
array: *const f64,
n: ::std::os::raw::c_int,
) -> *mut VipsArrayDouble;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsRect {
pub left: ::std::os::raw::c_int,
pub top: ::std::os::raw::c_int,
pub width: ::std::os::raw::c_int,
pub height: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout__VipsRect() {
assert_eq!(
::std::mem::size_of::<_VipsRect>(),
16usize,
concat!("Size of: ", stringify!(_VipsRect))
);
assert_eq!(
::std::mem::align_of::<_VipsRect>(),
4usize,
concat!("Alignment of ", stringify!(_VipsRect))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRect>())).left as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsRect),
"::",
stringify!(left)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRect>())).top as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_VipsRect),
"::",
stringify!(top)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRect>())).width as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_VipsRect),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRect>())).height as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_VipsRect),
"::",
stringify!(height)
)
);
}
pub type VipsRect = _VipsRect;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VipsWindow {
pub ref_count: ::std::os::raw::c_int,
pub im: *mut _VipsImage,
pub top: ::std::os::raw::c_int,
pub height: ::std::os::raw::c_int,
pub data: *mut VipsPel,
pub baseaddr: *mut ::std::os::raw::c_void,
pub length: size_t,
}
#[test]
fn bindgen_test_layout_VipsWindow() {
assert_eq!(
::std::mem::size_of::<VipsWindow>(),
48usize,
concat!("Size of: ", stringify!(VipsWindow))
);
assert_eq!(
::std::mem::align_of::<VipsWindow>(),
8usize,
concat!("Alignment of ", stringify!(VipsWindow))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).ref_count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(ref_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).im as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).top as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(top)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).height as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).data as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).baseaddr as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(baseaddr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsWindow>())).length as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(VipsWindow),
"::",
stringify!(length)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VipsBufferThread {
pub hash: *mut GHashTable,
pub thread: *mut GThread,
}
#[test]
fn bindgen_test_layout_VipsBufferThread() {
assert_eq!(
::std::mem::size_of::<VipsBufferThread>(),
16usize,
concat!("Size of: ", stringify!(VipsBufferThread))
);
assert_eq!(
::std::mem::align_of::<VipsBufferThread>(),
8usize,
concat!("Alignment of ", stringify!(VipsBufferThread))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsBufferThread>())).hash as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(VipsBufferThread),
"::",
stringify!(hash)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<VipsBufferThread>())).thread as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(VipsBufferThread),
"::",
stringify!(thread)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsBufferCache {
pub buffers: *mut GSList,
pub thread: *mut GThread,
pub im: *mut _VipsImage,
pub buffer_thread: *mut VipsBufferThread,
pub reserve: *mut GSList,
pub n_reserve: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout__VipsBufferCache() {
assert_eq!(
::std::mem::size_of::<_VipsBufferCache>(),
48usize,
concat!("Size of: ", stringify!(_VipsBufferCache))
);
assert_eq!(
::std::mem::align_of::<_VipsBufferCache>(),
8usize,
concat!("Alignment of ", stringify!(_VipsBufferCache))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBufferCache>())).buffers as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsBufferCache),
"::",
stringify!(buffers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBufferCache>())).thread as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_VipsBufferCache),
"::",
stringify!(thread)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBufferCache>())).im as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_VipsBufferCache),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBufferCache>())).buffer_thread as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_VipsBufferCache),
"::",
stringify!(buffer_thread)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBufferCache>())).reserve as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_VipsBufferCache),
"::",
stringify!(reserve)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBufferCache>())).n_reserve as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_VipsBufferCache),
"::",
stringify!(n_reserve)
)
);
}
pub type VipsBufferCache = _VipsBufferCache;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsBuffer {
pub ref_count: ::std::os::raw::c_int,
pub im: *mut _VipsImage,
pub area: VipsRect,
pub done: gboolean,
pub cache: *mut VipsBufferCache,
pub buf: *mut VipsPel,
pub bsize: size_t,
}
#[test]
fn bindgen_test_layout__VipsBuffer() {
assert_eq!(
::std::mem::size_of::<_VipsBuffer>(),
64usize,
concat!("Size of: ", stringify!(_VipsBuffer))
);
assert_eq!(
::std::mem::align_of::<_VipsBuffer>(),
8usize,
concat!("Alignment of ", stringify!(_VipsBuffer))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).ref_count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(ref_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).im as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).area as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(area)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).done as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(done)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).cache as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(cache)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).buf as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsBuffer>())).bsize as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_VipsBuffer),
"::",
stringify!(bsize)
)
);
}
pub type VipsBuffer = _VipsBuffer;
pub const _RegionType_VIPS_REGION_NONE: _RegionType = 0;
pub const _RegionType_VIPS_REGION_BUFFER: _RegionType = 1;
pub const _RegionType_VIPS_REGION_OTHER_REGION: _RegionType = 2;
pub const _RegionType_VIPS_REGION_OTHER_IMAGE: _RegionType = 3;
pub const _RegionType_VIPS_REGION_WINDOW: _RegionType = 4;
pub type _RegionType = u32;
pub use self::_RegionType as RegionType;
pub const VipsDemandStyle_VIPS_DEMAND_STYLE_ERROR: VipsDemandStyle = -1;
pub const VipsDemandStyle_VIPS_DEMAND_STYLE_SMALLTILE: VipsDemandStyle = 0;
pub const VipsDemandStyle_VIPS_DEMAND_STYLE_FATSTRIP: VipsDemandStyle = 1;
pub const VipsDemandStyle_VIPS_DEMAND_STYLE_THINSTRIP: VipsDemandStyle = 2;
pub const VipsDemandStyle_VIPS_DEMAND_STYLE_ANY: VipsDemandStyle = 3;
pub type VipsDemandStyle = i32;
pub const VipsImageType_VIPS_IMAGE_ERROR: VipsImageType = -1;
pub const VipsImageType_VIPS_IMAGE_NONE: VipsImageType = 0;
pub const VipsImageType_VIPS_IMAGE_SETBUF: VipsImageType = 1;
pub const VipsImageType_VIPS_IMAGE_SETBUF_FOREIGN: VipsImageType = 2;
pub const VipsImageType_VIPS_IMAGE_OPENIN: VipsImageType = 3;
pub const VipsImageType_VIPS_IMAGE_MMAPIN: VipsImageType = 4;
pub const VipsImageType_VIPS_IMAGE_MMAPINRW: VipsImageType = 5;
pub const VipsImageType_VIPS_IMAGE_OPENOUT: VipsImageType = 6;
pub const VipsImageType_VIPS_IMAGE_PARTIAL: VipsImageType = 7;
pub type VipsImageType = i32;
pub const VipsInterpretation_VIPS_INTERPRETATION_ERROR: VipsInterpretation = -1;
pub const VipsInterpretation_VIPS_INTERPRETATION_MULTIBAND: VipsInterpretation = 0;
pub const VipsInterpretation_VIPS_INTERPRETATION_B_W: VipsInterpretation = 1;
pub const VipsInterpretation_VIPS_INTERPRETATION_HISTOGRAM: VipsInterpretation = 10;
pub const VipsInterpretation_VIPS_INTERPRETATION_XYZ: VipsInterpretation = 12;
pub const VipsInterpretation_VIPS_INTERPRETATION_LAB: VipsInterpretation = 13;
pub const VipsInterpretation_VIPS_INTERPRETATION_CMYK: VipsInterpretation = 15;
pub const VipsInterpretation_VIPS_INTERPRETATION_LABQ: VipsInterpretation = 16;
pub const VipsInterpretation_VIPS_INTERPRETATION_RGB: VipsInterpretation = 17;
pub const VipsInterpretation_VIPS_INTERPRETATION_CMC: VipsInterpretation = 18;
pub const VipsInterpretation_VIPS_INTERPRETATION_LCH: VipsInterpretation = 19;
pub const VipsInterpretation_VIPS_INTERPRETATION_LABS: VipsInterpretation = 21;
pub const VipsInterpretation_VIPS_INTERPRETATION_sRGB: VipsInterpretation = 22;
pub const VipsInterpretation_VIPS_INTERPRETATION_YXY: VipsInterpretation = 23;
pub const VipsInterpretation_VIPS_INTERPRETATION_FOURIER: VipsInterpretation = 24;
pub const VipsInterpretation_VIPS_INTERPRETATION_RGB16: VipsInterpretation = 25;
pub const VipsInterpretation_VIPS_INTERPRETATION_GREY16: VipsInterpretation = 26;
pub const VipsInterpretation_VIPS_INTERPRETATION_MATRIX: VipsInterpretation = 27;
pub const VipsInterpretation_VIPS_INTERPRETATION_scRGB: VipsInterpretation = 28;
pub const VipsInterpretation_VIPS_INTERPRETATION_HSV: VipsInterpretation = 29;
pub const VipsInterpretation_VIPS_INTERPRETATION_LAST: VipsInterpretation = 30;
pub type VipsInterpretation = i32;
pub const VipsBandFormat_VIPS_FORMAT_NOTSET: VipsBandFormat = -1;
pub const VipsBandFormat_VIPS_FORMAT_UCHAR: VipsBandFormat = 0;
pub const VipsBandFormat_VIPS_FORMAT_CHAR: VipsBandFormat = 1;
pub const VipsBandFormat_VIPS_FORMAT_USHORT: VipsBandFormat = 2;
pub const VipsBandFormat_VIPS_FORMAT_SHORT: VipsBandFormat = 3;
pub const VipsBandFormat_VIPS_FORMAT_UINT: VipsBandFormat = 4;
pub const VipsBandFormat_VIPS_FORMAT_INT: VipsBandFormat = 5;
pub const VipsBandFormat_VIPS_FORMAT_FLOAT: VipsBandFormat = 6;
pub const VipsBandFormat_VIPS_FORMAT_COMPLEX: VipsBandFormat = 7;
pub const VipsBandFormat_VIPS_FORMAT_DOUBLE: VipsBandFormat = 8;
pub const VipsBandFormat_VIPS_FORMAT_DPCOMPLEX: VipsBandFormat = 9;
pub const VipsBandFormat_VIPS_FORMAT_LAST: VipsBandFormat = 10;
pub type VipsBandFormat = i32;
pub const VipsCoding_VIPS_CODING_ERROR: VipsCoding = -1;
pub const VipsCoding_VIPS_CODING_NONE: VipsCoding = 0;
pub const VipsCoding_VIPS_CODING_LABQ: VipsCoding = 2;
pub const VipsCoding_VIPS_CODING_RAD: VipsCoding = 6;
pub const VipsCoding_VIPS_CODING_LAST: VipsCoding = 7;
pub type VipsCoding = i32;
pub type VipsStartFn = ::std::option::Option<
unsafe extern "C" fn(
out: *mut _VipsImage,
a: *mut ::std::os::raw::c_void,
b: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void,
>;
pub type VipsGenerateFn = ::std::option::Option<
unsafe extern "C" fn(
out: *mut _VipsRegion,
seq: *mut ::std::os::raw::c_void,
a: *mut ::std::os::raw::c_void,
b: *mut ::std::os::raw::c_void,
stop: *mut gboolean,
) -> ::std::os::raw::c_int,
>;
pub type VipsStopFn = ::std::option::Option<
unsafe extern "C" fn(
seq: *mut ::std::os::raw::c_void,
a: *mut ::std::os::raw::c_void,
b: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsProgress {
pub im: *mut _VipsImage,
pub run: ::std::os::raw::c_int,
pub eta: ::std::os::raw::c_int,
pub tpels: gint64,
pub npels: gint64,
pub percent: ::std::os::raw::c_int,
pub start: *mut GTimer,
}
#[test]
fn bindgen_test_layout__VipsProgress() {
assert_eq!(
::std::mem::size_of::<_VipsProgress>(),
48usize,
concat!("Size of: ", stringify!(_VipsProgress))
);
assert_eq!(
::std::mem::align_of::<_VipsProgress>(),
8usize,
concat!("Alignment of ", stringify!(_VipsProgress))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).im as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).run as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(run)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).eta as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(eta)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).tpels as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(tpels)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).npels as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(npels)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).percent as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(percent)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsProgress>())).start as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_VipsProgress),
"::",
stringify!(start)
)
);
}
pub type VipsProgress = _VipsProgress;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsImage {
pub parent_instance: VipsObject,
pub Xsize: ::std::os::raw::c_int,
pub Ysize: ::std::os::raw::c_int,
pub Bands: ::std::os::raw::c_int,
pub BandFmt: VipsBandFormat,
pub Coding: VipsCoding,
pub Type: VipsInterpretation,
pub Xres: f64,
pub Yres: f64,
pub Xoffset: ::std::os::raw::c_int,
pub Yoffset: ::std::os::raw::c_int,
pub Length: ::std::os::raw::c_int,
pub Compression: ::std::os::raw::c_short,
pub Level: ::std::os::raw::c_short,
pub Bbits: ::std::os::raw::c_int,
pub time: *mut VipsProgress,
pub Hist: *mut ::std::os::raw::c_char,
pub filename: *mut ::std::os::raw::c_char,
pub data: *mut VipsPel,
pub kill: ::std::os::raw::c_int,
pub Xres_float: f32,
pub Yres_float: f32,
pub mode: *mut ::std::os::raw::c_char,
pub dtype: VipsImageType,
pub fd: ::std::os::raw::c_int,
pub baseaddr: *mut ::std::os::raw::c_void,
pub length: size_t,
pub magic: guint32,
pub start_fn: VipsStartFn,
pub generate_fn: VipsGenerateFn,
pub stop_fn: VipsStopFn,
pub client1: *mut ::std::os::raw::c_void,
pub client2: *mut ::std::os::raw::c_void,
pub sslock: *mut GMutex,
pub regions: *mut GSList,
pub dhint: VipsDemandStyle,
pub meta: *mut GHashTable,
pub meta_traverse: *mut GSList,
pub sizeof_header: gint64,
pub windows: *mut GSList,
pub upstream: *mut GSList,
pub downstream: *mut GSList,
pub serial: ::std::os::raw::c_int,
pub history_list: *mut GSList,
pub progress_signal: *mut _VipsImage,
pub file_length: gint64,
pub hint_set: gboolean,
pub delete_on_close: gboolean,
pub delete_on_close_filename: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout__VipsImage() {
assert_eq!(
::std::mem::size_of::<_VipsImage>(),
392usize,
concat!("Size of: ", stringify!(_VipsImage))
);
assert_eq!(
::std::mem::align_of::<_VipsImage>(),
8usize,
concat!("Alignment of ", stringify!(_VipsImage))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).parent_instance as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(parent_instance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Xsize as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Xsize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Ysize as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Ysize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Bands as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Bands)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).BandFmt as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(BandFmt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Coding as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Coding)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Type as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Xres as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Xres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Yres as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Yres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Xoffset as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Xoffset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Yoffset as *const _ as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Yoffset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Length as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Compression as *const _ as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Compression)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Level as *const _ as usize },
134usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Level)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Bbits as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Bbits)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).time as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Hist as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Hist)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).filename as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(filename)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).data as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).kill as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(kill)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Xres_float as *const _ as usize },
180usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Xres_float)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).Yres_float as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(Yres_float)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).mode as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).dtype as *const _ as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(dtype)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).fd as *const _ as usize },
204usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).baseaddr as *const _ as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(baseaddr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).length as *const _ as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).magic as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(magic)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).start_fn as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(start_fn)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).generate_fn as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(generate_fn)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).stop_fn as *const _ as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(stop_fn)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).client1 as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(client1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).client2 as *const _ as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(client2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).sslock as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(sslock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).regions as *const _ as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(regions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).dhint as *const _ as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(dhint)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).meta as *const _ as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(meta)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).meta_traverse as *const _ as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(meta_traverse)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).sizeof_header as *const _ as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(sizeof_header)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).windows as *const _ as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(windows)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).upstream as *const _ as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(upstream)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).downstream as *const _ as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(downstream)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).serial as *const _ as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(serial)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).history_list as *const _ as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(history_list)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).progress_signal as *const _ as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(progress_signal)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).file_length as *const _ as usize },
368usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(file_length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).hint_set as *const _ as usize },
376usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(hint_set)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsImage>())).delete_on_close as *const _ as usize },
380usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(delete_on_close)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<_VipsImage>())).delete_on_close_filename as *const _ as usize
},
384usize,
concat!(
"Offset of field: ",
stringify!(_VipsImage),
"::",
stringify!(delete_on_close_filename)
)
);
}
extern "C" {
pub fn vips_image_new_from_file(name: *const ::std::os::raw::c_char, ...) -> *mut VipsImage;
}
extern "C" {
pub fn vips_image_new_from_buffer(
buf: *const ::std::os::raw::c_void,
len: size_t,
option_string: *const ::std::os::raw::c_char,
...
) -> *mut VipsImage;
}
extern "C" {
pub fn vips_error_buffer() -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _VipsRegion {
pub parent_object: VipsObject,
pub im: *mut VipsImage,
pub valid: VipsRect,
pub type_: RegionType,
pub data: *mut VipsPel,
pub bpl: ::std::os::raw::c_int,
pub seq: *mut ::std::os::raw::c_void,
pub thread: *mut GThread,
pub window: *mut VipsWindow,
pub buffer: *mut VipsBuffer,
pub invalid: gboolean,
}
#[test]
fn bindgen_test_layout__VipsRegion() {
assert_eq!(
::std::mem::size_of::<_VipsRegion>(),
168usize,
concat!("Size of: ", stringify!(_VipsRegion))
);
assert_eq!(
::std::mem::align_of::<_VipsRegion>(),
8usize,
concat!("Alignment of ", stringify!(_VipsRegion))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).parent_object as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(parent_object)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).im as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).valid as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(valid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).type_ as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).data as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).bpl as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(bpl)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).seq as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(seq)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).thread as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(thread)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).window as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(window)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).buffer as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_VipsRegion>())).invalid as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_VipsRegion),
"::",
stringify!(invalid)
)
);
}
extern "C" {
pub fn vips_image_get_width(image: *const VipsImage) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_image_get_height(image: *const VipsImage) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_concurrency_set(concurrency: ::std::os::raw::c_int);
}
extern "C" {
pub fn vips_jpegsave(
in_: *mut VipsImage,
filename: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_jpegsave_buffer(
in_: *mut VipsImage,
buf: *mut *mut ::std::os::raw::c_void,
len: *mut size_t,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_pngsave(
in_: *mut VipsImage,
filename: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_pngsave_buffer(
in_: *mut VipsImage,
buf: *mut *mut ::std::os::raw::c_void,
len: *mut size_t,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_crop(
in_: *mut VipsImage,
out: *mut *mut VipsImage,
left: ::std::os::raw::c_int,
top: ::std::os::raw::c_int,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_smartcrop(
in_: *mut VipsImage,
out: *mut *mut VipsImage,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vips_resize(
in_: *mut VipsImage,
out: *mut *mut VipsImage,
scale: f64,
...
) -> ::std::os::raw::c_int;
}