display_list.rs 348 B

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