| 1 |
#include <stdarg.h> |
| 2 |
#include <stdbool.h> |
| 3 |
#include <stdint.h> |
| 4 |
#include <stdlib.h> |
| 5 |
|
| 6 |
typedef struct StylePoint_i32 { |
| 7 |
int32_t x; |
| 8 |
int32_t y; |
| 9 |
} StylePoint_i32; |
| 10 |
|
| 11 |
typedef struct StylePoint_f32 { |
| 12 |
float x; |
| 13 |
float y; |
| 14 |
} StylePoint_f32; |
| 15 |
|
| 16 |
enum StyleFoo_i32_Tag |
| 17 |
#ifdef __cplusplus |
| 18 |
: uint8_t |
| 19 |
#endif // __cplusplus |
| 20 |
{ |
| 21 |
Foo_i32, |
| 22 |
Bar_i32, |
| 23 |
Baz_i32, |
| 24 |
Bazz_i32, |
| 25 |
}; |
| 26 |
#ifndef __cplusplus |
| 27 |
typedef uint8_t StyleFoo_i32_Tag; |
| 28 |
#endif // __cplusplus |
| 29 |
|
| 30 |
typedef struct StyleFoo_Body_i32 { |
| 31 |
StyleFoo_i32_Tag tag; |
| 32 |
int32_t x; |
| 33 |
struct StylePoint_i32 y; |
| 34 |
struct StylePoint_f32 z; |
| 35 |
} StyleFoo_Body_i32; |
| 36 |
|
| 37 |
typedef union StyleFoo_i32 { |
| 38 |
StyleFoo_i32_Tag tag; |
| 39 |
StyleFoo_Body_i32 foo; |
| 40 |
struct { |
| 41 |
StyleFoo_i32_Tag bar_tag; |
| 42 |
int32_t bar; |
| 43 |
}; |
| 44 |
struct { |
| 45 |
StyleFoo_i32_Tag baz_tag; |
| 46 |
struct StylePoint_i32 baz; |
| 47 |
}; |
| 48 |
} StyleFoo_i32; |
| 49 |
|
| 50 |
typedef enum StyleBar_i32_Tag { |
| 51 |
Bar1_i32, |
| 52 |
Bar2_i32, |
| 53 |
Bar3_i32, |
| 54 |
Bar4_i32, |
| 55 |
} StyleBar_i32_Tag; |
| 56 |
|
| 57 |
typedef struct StyleBar1_Body_i32 { |
| 58 |
int32_t x; |
| 59 |
struct StylePoint_i32 y; |
| 60 |
struct StylePoint_f32 z; |
| 61 |
int32_t (*u)(int32_t); |
| 62 |
} StyleBar1_Body_i32; |
| 63 |
|
| 64 |
typedef struct StyleBar_i32 { |
| 65 |
StyleBar_i32_Tag tag; |
| 66 |
union { |
| 67 |
StyleBar1_Body_i32 bar1; |
| 68 |
struct { |
| 69 |
int32_t bar2; |
| 70 |
}; |
| 71 |
struct { |
| 72 |
struct StylePoint_i32 bar3; |
| 73 |
}; |
| 74 |
}; |
| 75 |
} StyleBar_i32; |
| 76 |
|
| 77 |
typedef struct StylePoint_u32 { |
| 78 |
uint32_t x; |
| 79 |
uint32_t y; |
| 80 |
} StylePoint_u32; |
| 81 |
|
| 82 |
typedef enum StyleBar_u32_Tag { |
| 83 |
Bar1_u32, |
| 84 |
Bar2_u32, |
| 85 |
Bar3_u32, |
| 86 |
Bar4_u32, |
| 87 |
} StyleBar_u32_Tag; |
| 88 |
|
| 89 |
typedef struct StyleBar1_Body_u32 { |
| 90 |
int32_t x; |
| 91 |
struct StylePoint_u32 y; |
| 92 |
struct StylePoint_f32 z; |
| 93 |
int32_t (*u)(int32_t); |
| 94 |
} StyleBar1_Body_u32; |
| 95 |
|
| 96 |
typedef struct StyleBar_u32 { |
| 97 |
StyleBar_u32_Tag tag; |
| 98 |
union { |
| 99 |
StyleBar1_Body_u32 bar1; |
| 100 |
struct { |
| 101 |
uint32_t bar2; |
| 102 |
}; |
| 103 |
struct { |
| 104 |
struct StylePoint_u32 bar3; |
| 105 |
}; |
| 106 |
}; |
| 107 |
} StyleBar_u32; |
| 108 |
|
| 109 |
enum StyleBaz_Tag |
| 110 |
#ifdef __cplusplus |
| 111 |
: uint8_t |
| 112 |
#endif // __cplusplus |
| 113 |
{ |
| 114 |
Baz1, |
| 115 |
Baz2, |
| 116 |
Baz3, |
| 117 |
}; |
| 118 |
#ifndef __cplusplus |
| 119 |
typedef uint8_t StyleBaz_Tag; |
| 120 |
#endif // __cplusplus |
| 121 |
|
| 122 |
typedef union StyleBaz { |
| 123 |
StyleBaz_Tag tag; |
| 124 |
struct { |
| 125 |
StyleBaz_Tag baz1_tag; |
| 126 |
struct StyleBar_u32 baz1; |
| 127 |
}; |
| 128 |
struct { |
| 129 |
StyleBaz_Tag baz2_tag; |
| 130 |
struct StylePoint_i32 baz2; |
| 131 |
}; |
| 132 |
} StyleBaz; |
| 133 |
|
| 134 |
enum StyleTaz_Tag |
| 135 |
#ifdef __cplusplus |
| 136 |
: uint8_t |
| 137 |
#endif // __cplusplus |
| 138 |
{ |
| 139 |
Taz1, |
| 140 |
Taz2, |
| 141 |
Taz3, |
| 142 |
}; |
| 143 |
#ifndef __cplusplus |
| 144 |
typedef uint8_t StyleTaz_Tag; |
| 145 |
#endif // __cplusplus |
| 146 |
|
| 147 |
typedef struct StyleTaz { |
| 148 |
StyleTaz_Tag tag; |
| 149 |
union { |
| 150 |
struct { |
| 151 |
struct StyleBar_u32 taz1; |
| 152 |
}; |
| 153 |
struct { |
| 154 |
union StyleBaz taz2; |
| 155 |
}; |
| 156 |
}; |
| 157 |
} StyleTaz; |
| 158 |
|
| 159 |
#ifdef __cplusplus |
| 160 |
extern "C" { |
| 161 |
#endif // __cplusplus |
| 162 |
|
| 163 |
void foo(const union StyleFoo_i32 *foo, |
| 164 |
const struct StyleBar_i32 *bar, |
| 165 |
const union StyleBaz *baz, |
| 166 |
const struct StyleTaz *taz); |
| 167 |
|
| 168 |
#ifdef __cplusplus |
| 169 |
} // extern "C" |
| 170 |
#endif // __cplusplus |