File: display_list.rs

package info (click to toggle)
rust-cbindgen 0.24.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,532 kB
  • sloc: ansic: 15; makefile: 11
file content (18 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[repr(u8)]
pub enum DisplayItem {
    Fill(Rect, Color),
    Image { id: u32, bounds: Rect },
    ClearScreen,
}

#[repr(C)]
pub struct Rect { x: f32, y: f32, w: f32, h: f32 }

#[repr(C)]
pub struct Color { r: u8, g: u8, b: u8, a: u8 }

#[no_mangle]
pub extern "C" fn push_item(item: DisplayItem) -> bool { 
    ::std::mem::drop(item);
    true
}