1 #include "NativeReanimatedModuleSpec.h" 2 3 namespace reanimated { 4 5 static jsi::Value 6 __hostFunction_NativeReanimatedModuleSpec_installCoreFunctions( 7 jsi::Runtime &rt, 8 TurboModule &turboModule, 9 const jsi::Value *args, 10 size_t count) { 11 static_cast<NativeReanimatedModuleSpec *>(&turboModule) 12 ->installCoreFunctions(rt, std::move(args[0])); 13 return jsi::Value::undefined(); 14 } 15 16 // SharedValue 17 18 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_makeShareable( 19 jsi::Runtime &rt, 20 TurboModule &turboModule, 21 const jsi::Value *args, 22 size_t count) { 23 return static_cast<NativeReanimatedModuleSpec *>(&turboModule) 24 ->makeShareable(rt, std::move(args[0])); 25 } 26 27 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_makeMutable( 28 jsi::Runtime &rt, 29 TurboModule &turboModule, 30 const jsi::Value *args, 31 size_t count) { 32 return static_cast<NativeReanimatedModuleSpec *>(&turboModule) 33 ->makeMutable(rt, std::move(args[0])); 34 } 35 36 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_makeRemote( 37 jsi::Runtime &rt, 38 TurboModule &turboModule, 39 const jsi::Value *args, 40 size_t count) { 41 return static_cast<NativeReanimatedModuleSpec *>(&turboModule) 42 ->makeRemote(rt, std::move(args[0])); 43 } 44 45 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_startMapper( 46 jsi::Runtime &rt, 47 TurboModule &turboModule, 48 const jsi::Value *args, 49 size_t count) { 50 return static_cast<NativeReanimatedModuleSpec *>(&turboModule) 51 ->startMapper( 52 rt, 53 std::move(args[0]), 54 std::move(args[1]), 55 std::move(args[2]), 56 std::move(args[3]), 57 std::move(args[4])); 58 } 59 60 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_stopMapper( 61 jsi::Runtime &rt, 62 TurboModule &turboModule, 63 const jsi::Value *args, 64 size_t count) { 65 static_cast<NativeReanimatedModuleSpec *>(&turboModule) 66 ->stopMapper(rt, std::move(args[0])); 67 return jsi::Value::undefined(); 68 } 69 70 static jsi::Value 71 __hostFunction_NativeReanimatedModuleSpec_registerEventHandler( 72 jsi::Runtime &rt, 73 TurboModule &turboModule, 74 const jsi::Value *args, 75 size_t count) { 76 return static_cast<NativeReanimatedModuleSpec *>(&turboModule) 77 ->registerEventHandler(rt, std::move(args[0]), std::move(args[1])); 78 } 79 80 static jsi::Value 81 __hostFunction_NativeReanimatedModuleSpec_unregisterEventHandler( 82 jsi::Runtime &rt, 83 TurboModule &turboModule, 84 const jsi::Value *args, 85 size_t count) { 86 static_cast<NativeReanimatedModuleSpec *>(&turboModule) 87 ->unregisterEventHandler(rt, std::move(args[0])); 88 return jsi::Value::undefined(); 89 } 90 91 static jsi::Value __hostFunction_NativeReanimatedModuleSpec_getViewProp( 92 jsi::Runtime &rt, 93 TurboModule &turboModule, 94 const jsi::Value *args, 95 size_t count) { 96 static_cast<NativeReanimatedModuleSpec *>(&turboModule) 97 ->getViewProp( 98 rt, std::move(args[0]), std::move(args[1]), std::move(args[2])); 99 return jsi::Value::undefined(); 100 } 101 102 static jsi::Value 103 __hostFunction_NativeReanimatedModuleSpec_enableLayoutAnimations( 104 jsi::Runtime &rt, 105 TurboModule &turboModule, 106 const jsi::Value *args, 107 size_t count) { 108 static_cast<NativeReanimatedModuleSpec *>(&turboModule) 109 ->enableLayoutAnimations(rt, std::move(args[0])); 110 return jsi::Value::undefined(); 111 } 112 113 NativeReanimatedModuleSpec::NativeReanimatedModuleSpec( 114 std::shared_ptr<CallInvoker> jsInvoker) 115 : TurboModule("NativeReanimated", jsInvoker) { 116 methodMap_["installCoreFunctions"] = MethodMetadata{ 117 1, __hostFunction_NativeReanimatedModuleSpec_installCoreFunctions}; 118 119 methodMap_["makeShareable"] = MethodMetadata{ 120 1, __hostFunction_NativeReanimatedModuleSpec_makeShareable}; 121 methodMap_["makeMutable"] = 122 MethodMetadata{1, __hostFunction_NativeReanimatedModuleSpec_makeMutable}; 123 methodMap_["makeRemote"] = 124 MethodMetadata{1, __hostFunction_NativeReanimatedModuleSpec_makeRemote}; 125 126 methodMap_["startMapper"] = 127 MethodMetadata{5, __hostFunction_NativeReanimatedModuleSpec_startMapper}; 128 methodMap_["stopMapper"] = 129 MethodMetadata{1, __hostFunction_NativeReanimatedModuleSpec_stopMapper}; 130 131 methodMap_["registerEventHandler"] = MethodMetadata{ 132 2, __hostFunction_NativeReanimatedModuleSpec_registerEventHandler}; 133 methodMap_["unregisterEventHandler"] = MethodMetadata{ 134 1, __hostFunction_NativeReanimatedModuleSpec_unregisterEventHandler}; 135 136 methodMap_["getViewProp"] = 137 MethodMetadata{3, __hostFunction_NativeReanimatedModuleSpec_getViewProp}; 138 methodMap_["enableLayoutAnimations"] = MethodMetadata{ 139 2, __hostFunction_NativeReanimatedModuleSpec_enableLayoutAnimations}; 140 } 141 142 } // namespace reanimated 143