Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/display_list.cpp

raw
1 #include <cstdarg>
2 #include <cstdint>
3 #include <cstdlib>
4 #include <ostream>
5 #include <new>
6
7 struct Rect {
8 float x;
9 float y;
10 float w;
11 float h;
12 };
13
14 struct Color {
15 uint8_t r;
16 uint8_t g;
17 uint8_t b;
18 uint8_t a;
19 };
20
21 union DisplayItem {
22 enum class Tag : uint8_t {
23 Fill,
24 Image,
25 ClearScreen,
26 };
27
28 struct Fill_Body {
29 Tag tag;
30 Rect _0;
31 Color _1;
32 };
33
34 struct Image_Body {
35 Tag tag;
36 uint32_t id;
37 Rect bounds;
38 };
39
40 struct {
41 Tag tag;
42 };
43 Fill_Body fill;
44 Image_Body image;
45 };
46
47 extern "C" {
48
49 bool push_item(DisplayItem item);
50
51 } // extern "C"