|
| 1 | +#ifndef KONAN_LIBEVALUATION_INTEROP_H |
| 2 | +#define KONAN_LIBEVALUATION_INTEROP_H |
| 3 | +#ifdef __cplusplus |
| 4 | +extern "C" { |
| 5 | +#endif |
| 6 | +#ifdef __cplusplus |
| 7 | +typedef bool libevaluation_interop_KBoolean; |
| 8 | +#else |
| 9 | +typedef _Bool libevaluation_interop_KBoolean; |
| 10 | +#endif |
| 11 | +typedef unsigned short libevaluation_interop_KChar; |
| 12 | +typedef signed char libevaluation_interop_KByte; |
| 13 | +typedef short libevaluation_interop_KShort; |
| 14 | +typedef int libevaluation_interop_KInt; |
| 15 | +typedef long long libevaluation_interop_KLong; |
| 16 | +typedef unsigned char libevaluation_interop_KUByte; |
| 17 | +typedef unsigned short libevaluation_interop_KUShort; |
| 18 | +typedef unsigned int libevaluation_interop_KUInt; |
| 19 | +typedef unsigned long long libevaluation_interop_KULong; |
| 20 | +typedef float libevaluation_interop_KFloat; |
| 21 | +typedef double libevaluation_interop_KDouble; |
| 22 | +typedef float __attribute__ ((__vector_size__ (16))) libevaluation_interop_KVector128; |
| 23 | +typedef void* libevaluation_interop_KNativePtr; |
| 24 | +struct libevaluation_interop_KType; |
| 25 | +typedef struct libevaluation_interop_KType libevaluation_interop_KType; |
| 26 | + |
| 27 | +typedef struct { |
| 28 | + libevaluation_interop_KNativePtr pinned; |
| 29 | +} libevaluation_interop_kref_kotlin_Byte; |
| 30 | +typedef struct { |
| 31 | + libevaluation_interop_KNativePtr pinned; |
| 32 | +} libevaluation_interop_kref_kotlin_Short; |
| 33 | +typedef struct { |
| 34 | + libevaluation_interop_KNativePtr pinned; |
| 35 | +} libevaluation_interop_kref_kotlin_Int; |
| 36 | +typedef struct { |
| 37 | + libevaluation_interop_KNativePtr pinned; |
| 38 | +} libevaluation_interop_kref_kotlin_Long; |
| 39 | +typedef struct { |
| 40 | + libevaluation_interop_KNativePtr pinned; |
| 41 | +} libevaluation_interop_kref_kotlin_Float; |
| 42 | +typedef struct { |
| 43 | + libevaluation_interop_KNativePtr pinned; |
| 44 | +} libevaluation_interop_kref_kotlin_Double; |
| 45 | +typedef struct { |
| 46 | + libevaluation_interop_KNativePtr pinned; |
| 47 | +} libevaluation_interop_kref_kotlin_Char; |
| 48 | +typedef struct { |
| 49 | + libevaluation_interop_KNativePtr pinned; |
| 50 | +} libevaluation_interop_kref_kotlin_Boolean; |
| 51 | +typedef struct { |
| 52 | + libevaluation_interop_KNativePtr pinned; |
| 53 | +} libevaluation_interop_kref_kotlin_Unit; |
| 54 | +typedef struct { |
| 55 | + libevaluation_interop_KNativePtr pinned; |
| 56 | +} libevaluation_interop_kref_kotlin_UByte; |
| 57 | +typedef struct { |
| 58 | + libevaluation_interop_KNativePtr pinned; |
| 59 | +} libevaluation_interop_kref_kotlin_UShort; |
| 60 | +typedef struct { |
| 61 | + libevaluation_interop_KNativePtr pinned; |
| 62 | +} libevaluation_interop_kref_kotlin_UInt; |
| 63 | +typedef struct { |
| 64 | + libevaluation_interop_KNativePtr pinned; |
| 65 | +} libevaluation_interop_kref_kotlin_ULong; |
| 66 | + |
| 67 | + |
| 68 | +typedef struct { |
| 69 | + /* Service functions. */ |
| 70 | + void (*DisposeStablePointer)(libevaluation_interop_KNativePtr ptr); |
| 71 | + void (*DisposeString)(const char* string); |
| 72 | + libevaluation_interop_KBoolean (*IsInstance)(libevaluation_interop_KNativePtr ref, const libevaluation_interop_KType* type); |
| 73 | + libevaluation_interop_kref_kotlin_Byte (*createNullableByte)(libevaluation_interop_KByte); |
| 74 | + libevaluation_interop_KByte (*getNonNullValueOfByte)(libevaluation_interop_kref_kotlin_Byte); |
| 75 | + libevaluation_interop_kref_kotlin_Short (*createNullableShort)(libevaluation_interop_KShort); |
| 76 | + libevaluation_interop_KShort (*getNonNullValueOfShort)(libevaluation_interop_kref_kotlin_Short); |
| 77 | + libevaluation_interop_kref_kotlin_Int (*createNullableInt)(libevaluation_interop_KInt); |
| 78 | + libevaluation_interop_KInt (*getNonNullValueOfInt)(libevaluation_interop_kref_kotlin_Int); |
| 79 | + libevaluation_interop_kref_kotlin_Long (*createNullableLong)(libevaluation_interop_KLong); |
| 80 | + libevaluation_interop_KLong (*getNonNullValueOfLong)(libevaluation_interop_kref_kotlin_Long); |
| 81 | + libevaluation_interop_kref_kotlin_Float (*createNullableFloat)(libevaluation_interop_KFloat); |
| 82 | + libevaluation_interop_KFloat (*getNonNullValueOfFloat)(libevaluation_interop_kref_kotlin_Float); |
| 83 | + libevaluation_interop_kref_kotlin_Double (*createNullableDouble)(libevaluation_interop_KDouble); |
| 84 | + libevaluation_interop_KDouble (*getNonNullValueOfDouble)(libevaluation_interop_kref_kotlin_Double); |
| 85 | + libevaluation_interop_kref_kotlin_Char (*createNullableChar)(libevaluation_interop_KChar); |
| 86 | + libevaluation_interop_KChar (*getNonNullValueOfChar)(libevaluation_interop_kref_kotlin_Char); |
| 87 | + libevaluation_interop_kref_kotlin_Boolean (*createNullableBoolean)(libevaluation_interop_KBoolean); |
| 88 | + libevaluation_interop_KBoolean (*getNonNullValueOfBoolean)(libevaluation_interop_kref_kotlin_Boolean); |
| 89 | + libevaluation_interop_kref_kotlin_Unit (*createNullableUnit)(void); |
| 90 | + libevaluation_interop_kref_kotlin_UByte (*createNullableUByte)(libevaluation_interop_KUByte); |
| 91 | + libevaluation_interop_KUByte (*getNonNullValueOfUByte)(libevaluation_interop_kref_kotlin_UByte); |
| 92 | + libevaluation_interop_kref_kotlin_UShort (*createNullableUShort)(libevaluation_interop_KUShort); |
| 93 | + libevaluation_interop_KUShort (*getNonNullValueOfUShort)(libevaluation_interop_kref_kotlin_UShort); |
| 94 | + libevaluation_interop_kref_kotlin_UInt (*createNullableUInt)(libevaluation_interop_KUInt); |
| 95 | + libevaluation_interop_KUInt (*getNonNullValueOfUInt)(libevaluation_interop_kref_kotlin_UInt); |
| 96 | + libevaluation_interop_kref_kotlin_ULong (*createNullableULong)(libevaluation_interop_KULong); |
| 97 | + libevaluation_interop_KULong (*getNonNullValueOfULong)(libevaluation_interop_kref_kotlin_ULong); |
| 98 | + |
| 99 | + /* User functions. */ |
| 100 | + struct { |
| 101 | + struct { |
| 102 | + const char* (*evaluate)(const char* rules, const char* user); |
| 103 | + } root; |
| 104 | + } kotlin; |
| 105 | +} libevaluation_interop_ExportedSymbols; |
| 106 | +extern libevaluation_interop_ExportedSymbols* libevaluation_interop_symbols(void); |
| 107 | +#ifdef __cplusplus |
| 108 | +} /* extern "C" */ |
| 109 | +#endif |
| 110 | +#endif /* KONAN_LIBEVALUATION_INTEROP_H */ |
0 commit comments