xref: /expo/android/vendored/sdk47/react-native-reanimated/Common/cpp/SharedItems/RemoteObject.h (revision bb5069cd)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 #include <memory>
4 #include <vector>
5 
6 #include "FrozenObject.h"
7 #include "JSIStoreValueUser.h"
8 #include "SharedParent.h"
9 
10 using namespace facebook;
11 
12 namespace reanimated {
13 
14 class RemoteObject : public jsi::HostObject, public StoreUser {
15  private:
16   std::weak_ptr<jsi::Value> backing;
17   std::unique_ptr<FrozenObject> initializer;
18 
19  public:
20   void maybeInitializeOnWorkletRuntime(jsi::Runtime &rt);
21   RemoteObject(
22       jsi::Runtime &rt,
23       const jsi::Object &object,
24       RuntimeManager *runtimeManager,
25       std::shared_ptr<Scheduler> s)
26       : StoreUser(s, *runtimeManager),
27         initializer(
28             std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
29   void
30   set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
31   jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
32   std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
33 };
34 
35 } // namespace reanimated
36 

served by {OpenGrok

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