.cargo/vendor/cbindgen/tests/rust/display_list.rs
raw| 1 | #[repr(u8)] |
| 2 | pub enum DisplayItem { |
| 3 | Fill(Rect, Color), |
| 4 | Image { id: u32, bounds: Rect }, |
| 5 | ClearScreen, |
| 6 | } |
| 7 | |
| 8 | #[repr(C)] |
| 9 | pub struct Rect { x: f32, y: f32, w: f32, h: f32 } |
| 10 | |
| 11 | #[repr(C)] |
| 12 | pub struct Color { r: u8, g: u8, b: u8, a: u8 } |
| 13 | |
| 14 | #[no_mangle] |
| 15 | pub extern "C" fn push_item(item: DisplayItem) -> bool { |
| 16 | ::std::mem::drop(item); |
| 17 | true |
| 18 | } |