xref: /expo/ios/vendored/sdk47/react-native-reanimated/Common/cpp/SharedItems/HostFunctionHandler.h (revision dbfb9e4d)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 #include <ABI47_0_0jsi/ABI47_0_0jsi.h>
4 #include <memory>
5 #include <string>
6 
7 using namespace ABI47_0_0facebook;
8 
9 namespace ABI47_0_0reanimated {
10 
11 struct HostFunctionHandler : jsi::HostObject {
12   std::shared_ptr<jsi::Function> pureFunction;
13   std::string functionName;
14   jsi::Runtime *hostRuntime;
15   jsi::HostObject a;
16 
17   HostFunctionHandler(std::shared_ptr<jsi::Function> f, jsi::Runtime &rt) {
18     pureFunction = f;
19     functionName = f->getProperty(rt, "name").asString(rt).utf8(rt);
20     hostRuntime = &rt;
21   }
22 
23   std::shared_ptr<jsi::Function> getPureFunction() {
24     return pureFunction;
25   }
26 };
27 
28 } // namespace reanimated
29 

served by {OpenGrok

Last Index Update: Tue Oct 21 18:42:31 GMT 2025