1 #include <stdarg.h> 2 #include <stdbool.h> 3 #include <stdint.h> 4 #include <stdlib.h> 5 6 #if (defined(PLATFORM_WIN) || defined(M_32)) 7 enum BarType 8 #ifdef __cplusplus 9 : uint32_t 10 #endif // __cplusplus 11 { 12 A, 13 B, 14 C, 15 }; 16 #ifndef __cplusplus 17 typedef uint32_t BarType; 18 #endif // __cplusplus 19 #endif 20 21 #if (defined(PLATFORM_UNIX) && defined(X11)) 22 enum FooType 23 #ifdef __cplusplus 24 : uint32_t 25 #endif // __cplusplus 26 { 27 A, 28 B, 29 C, 30 }; 31 #ifndef __cplusplus 32 typedef uint32_t FooType; 33 #endif // __cplusplus 34 #endif 35 36 #if (defined(PLATFORM_UNIX) && defined(X11)) 37 typedef struct FooHandle { 38 FooType ty; 39 int32_t x; 40 float y; 41 } FooHandle; 42 #endif 43 44 enum C_Tag 45 #ifdef __cplusplus 46 : uint8_t 47 #endif // __cplusplus 48 { 49 C1, 50 C2, 51 #if defined(PLATFORM_WIN) 52 C3, 53 #endif 54 #if defined(PLATFORM_UNIX) 55 C5, 56 #endif 57 }; 58 #ifndef __cplusplus 59 typedef uint8_t C_Tag; 60 #endif // __cplusplus 61 62 #if defined(PLATFORM_UNIX) 63 typedef struct C5_Body { 64 C_Tag tag; 65 int32_t int_; 66 } C5_Body; 67 #endif 68 69 typedef union C { 70 C_Tag tag; 71 #if defined(PLATFORM_UNIX) 72 C5_Body c5; 73 #endif 74 } C; 75 76 #if (defined(PLATFORM_WIN) || defined(M_32)) 77 typedef struct BarHandle { 78 BarType ty; 79 int32_t x; 80 float y; 81 } BarHandle; 82 #endif 83 84 #ifdef __cplusplus 85 extern "C" { 86 #endif // __cplusplus 87 88 #if (defined(PLATFORM_UNIX) && defined(X11)) 89 void root(FooHandle a, C c); 90 #endif 91 92 #if (defined(PLATFORM_WIN) || defined(M_32)) 93 void root(BarHandle a, C c); 94 #endif 95 96 #ifdef __cplusplus 97 } // extern "C" 98 #endif // __cplusplus 99