1 #pragma once 2 #ifdef RCT_NEW_ARCH_ENABLED 3 4 #ifdef ANDROID 5 #include <fbjni/fbjni.h> 6 #include <react/fabric/Binding.h> 7 #endif 8 #include <react/renderer/uimanager/UIManager.h> 9 10 #include <memory> 11 #include <string> 12 13 using namespace facebook; 14 using namespace react; 15 16 namespace reanimated { 17 18 struct UIManagerBindingPublic { 19 void *vtable; 20 std::shared_ptr<UIManager> uiManager_; 21 std::unique_ptr<EventHandler const> eventHandler_; 22 }; 23 24 struct UIManagerPublic { 25 void *vtable; 26 SharedComponentDescriptorRegistry componentDescriptorRegistry_; 27 UIManagerDelegate *delegate_; 28 UIManagerAnimationDelegate *animationDelegate_{nullptr}; 29 RuntimeExecutor const runtimeExecutor_{}; 30 ShadowTreeRegistry shadowTreeRegistry_{}; 31 BackgroundExecutor const backgroundExecutor_{}; 32 ContextContainer::Shared contextContainer_; 33 }; 34 35 #ifdef ANDROID 36 struct BindingPublic : public jni::HybridClass<Binding>, 37 public SchedulerDelegate, 38 public LayoutAnimationStatusDelegate { 39 std::shared_mutex installMutex_; 40 std::shared_ptr<FabricMountingManager> mountingManager_; 41 std::shared_ptr<facebook::react::Scheduler> scheduler_; 42 }; 43 44 struct SchedulerPublic : public UIManagerDelegate { 45 SchedulerDelegate *delegate_; 46 SharedComponentDescriptorRegistry componentDescriptorRegistry_; 47 RuntimeExecutor runtimeExecutor_; 48 }; 49 50 RuntimeExecutor getRuntimeExecutorFromBinding(Binding *binding); 51 #endif 52 53 std::shared_ptr<const ContextContainer> getContextContainerFromUIManager( 54 const UIManager *uiManager); 55 56 } // namespace reanimated 57 58 #endif // RCT_NEW_ARCH_ENABLED 59