use std::ffi::{c_int, c_uchar}; #[repr(C)] pub struct Color { red: c_uchar, green: c_uchar, blue: c_uchar, alpha: c_uchar, } #[repr(C)] pub enum ImageFormat { RRGBFormat = 0, RRGBAFormat, } #[repr(C)] pub struct Image { data: *mut c_uchar, width: c_int, height: c_int, format: ImageFormat, background: Color, ref_count: c_int, } pub mod ffi { use super::Image; unsafe extern "C" { pub fn RRetainImage(image: *mut Image) -> *mut Image; } }