1from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
2from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
3cdef extern from *:
4  ctypedef bint bool
5  ctypedef struct va_list
6
7cdef extern from *:
8
9  ctypedef struct StylePoint_i32:
10    int32_t x;
11    int32_t y;
12
13  ctypedef struct StylePoint_f32:
14    float x;
15    float y;
16
17  cdef enum:
18    Foo_i32,
19    Bar_i32,
20    Baz_i32,
21    Bazz_i32,
22  ctypedef uint8_t StyleFoo_i32_Tag;
23
24  ctypedef struct StyleFoo_Body_i32:
25    StyleFoo_i32_Tag tag;
26    int32_t x;
27    StylePoint_i32 y;
28    StylePoint_f32 z;
29
30  ctypedef union StyleFoo_i32:
31    StyleFoo_i32_Tag tag;
32    StyleFoo_Body_i32 foo;
33    StyleFoo_i32_Tag bar_tag;
34    int32_t bar;
35    StyleFoo_i32_Tag baz_tag;
36    StylePoint_i32 baz;
37
38  ctypedef enum StyleBar_i32_Tag:
39    Bar1_i32,
40    Bar2_i32,
41    Bar3_i32,
42    Bar4_i32,
43
44  ctypedef struct StyleBar1_Body_i32:
45    int32_t x;
46    StylePoint_i32 y;
47    StylePoint_f32 z;
48    int32_t (*u)(int32_t);
49
50  ctypedef struct StyleBar_i32:
51    StyleBar_i32_Tag tag;
52    StyleBar1_Body_i32 bar1;
53    int32_t bar2;
54    StylePoint_i32 bar3;
55
56  ctypedef struct StylePoint_u32:
57    uint32_t x;
58    uint32_t y;
59
60  ctypedef enum StyleBar_u32_Tag:
61    Bar1_u32,
62    Bar2_u32,
63    Bar3_u32,
64    Bar4_u32,
65
66  ctypedef struct StyleBar1_Body_u32:
67    int32_t x;
68    StylePoint_u32 y;
69    StylePoint_f32 z;
70    int32_t (*u)(int32_t);
71
72  ctypedef struct StyleBar_u32:
73    StyleBar_u32_Tag tag;
74    StyleBar1_Body_u32 bar1;
75    uint32_t bar2;
76    StylePoint_u32 bar3;
77
78  cdef enum:
79    Baz1,
80    Baz2,
81    Baz3,
82  ctypedef uint8_t StyleBaz_Tag;
83
84  ctypedef union StyleBaz:
85    StyleBaz_Tag tag;
86    StyleBaz_Tag baz1_tag;
87    StyleBar_u32 baz1;
88    StyleBaz_Tag baz2_tag;
89    StylePoint_i32 baz2;
90
91  cdef enum:
92    Taz1,
93    Taz2,
94    Taz3,
95  ctypedef uint8_t StyleTaz_Tag;
96
97  ctypedef struct StyleTaz:
98    StyleTaz_Tag tag;
99    StyleBar_u32 taz1;
100    StyleBaz taz2;
101
102  void foo(const StyleFoo_i32 *foo,
103           const StyleBar_i32 *bar,
104           const StyleBaz *baz,
105           const StyleTaz *taz);
106