コード例 #1
0
 private UIImplementation(ReactContext reactContext, ViewManagerRegistry viewManagers, EventDispatcher eventDispatcher)
     : this(
         viewManagers,
         new UIViewOperationQueue(reactContext,
                                  new NativeViewHierarchyManager(viewManagers)),
         eventDispatcher)
 {
 }
コード例 #2
0
 /// <summary>
 /// Instantiates the <see cref="NativeViewHierarchyManager"/>.
 /// </summary>
 /// <param name="viewManagers">The view manager registry.</param>
 public NativeViewHierarchyManager(ViewManagerRegistry viewManagers)
 {
     _viewManagers       = viewManagers;
     _layoutAnimator     = new LayoutAnimationController();
     _tagsToViews        = new Dictionary <int, DependencyObject>();
     _tagsToViewManagers = new Dictionary <int, IViewManager>();
     _rootTags           = new Dictionary <int, bool>();
     _rootViewManager    = new RootViewManager();
 }
コード例 #3
0
 /// <summary>
 /// Instantiates the <see cref="NativeViewHierarchyManager"/>.
 /// </summary>
 /// <param name="viewManagers">The view manager registry.</param>
 public NativeViewHierarchyManager(ViewManagerRegistry viewManagers)
 {
     _viewManagers       = viewManagers;
     _layoutAnimator     = new LayoutAnimationController();
     _tagsToViews        = new Dictionary <int, Widget>();
     _tagsToViewManagers = new Dictionary <int, IViewManager>();
     _rootTags           = new Dictionary <int, bool>();
     //_jsResponderHandler = new JavaScriptResponderHandler();
     _rootViewManager = new RootViewManager();
 }
コード例 #4
0
 /// <summary>
 /// Instantiates the <see cref="UIImplementation"/>.
 /// </summary>
 /// <param name="viewManagers">The view managers.</param>
 /// <param name="operationsQueue">The operations queue.</param>
 protected UIImplementation(
     ViewManagerRegistry viewManagers,
     UIViewOperationQueue operationsQueue)
 {
     _viewManagers                 = viewManagers;
     _operationsQueue              = operationsQueue;
     _shadowNodeRegistry           = new ShadowNodeRegistry();
     _nativeViewHierarchyOptimizer = new NativeViewHierarchyOptimizer(
         _operationsQueue,
         _shadowNodeRegistry);
 }
コード例 #5
0
 /// <summary>
 /// Instantiates the <see cref="UIImplementation"/>.
 /// </summary>
 /// <param name="reactContext">The React context.</param>
 /// <param name="viewManagers">The view managers.</param>
 /// <param name="operationsQueue">The operations queue.</param>
 /// <param name="eventDispatcher">The event dispatcher.</param>
 protected UIImplementation(
     ReactContext reactContext,
     ViewManagerRegistry viewManagers,
     UIViewOperationQueue operationsQueue,
     EventDispatcher eventDispatcher)
 {
     _reactContext                 = reactContext;
     _viewManagers                 = viewManagers;
     _operationsQueue              = operationsQueue;
     _shadowNodeRegistry           = new ShadowNodeRegistry();
     _nativeViewHierarchyOptimizer = new NativeViewHierarchyOptimizer(
         _operationsQueue,
         _shadowNodeRegistry);
     _eventDispatcher = eventDispatcher;
 }
コード例 #6
0
        /// <summary>
        /// Instantiates the <see cref="UIViewOperationQueue"/>.
        /// </summary>
        /// <param name="reactContext">The React context.</param>
        /// <param name="viewManagerRegistry">
        /// The view manager registry.
        /// </param>
        public UIViewOperationQueue(ReactContext reactContext, ViewManagerRegistry viewManagerRegistry)
        {
            _reactContext        = reactContext;
            _viewManagerRegistry = viewManagerRegistry;
            _active = false;

            // Corner case: UWP scenarios that start with no main window.
            // We create the UIViewOperationQueueInstance for main dispatcher thread ahead of time so animations
            // in secondary windows can work.
            var queueInfo = new QueueInstanceInfo()
            {
                queueInstance = new UIViewOperationQueueInstance(
                    _reactContext,
                    new NativeViewHierarchyManager(_viewManagerRegistry, DispatcherHelpers.MainDispatcher, OnViewsDropped),
                    ReactChoreographer.Instance)
            };

            _dispatcherToOperationQueueInfo.Add(DispatcherHelpers.MainDispatcher, queueInfo);
            _mainUiViewOperationsQueueInstance = queueInfo.queueInstance;
        }
コード例 #7
0
        /// <summary>
        /// Instantiates the <see cref="NativeViewHierarchyManager"/>.
        /// </summary>
        /// <param name="viewManagers">The view manager registry.</param>
        /// <param name="dispatcher">The dispatcher of the view.</param>
        /// <param name="onDropView">Notification callback to be passed lists of dropped views tags.</param>
        public NativeViewHierarchyManager(ViewManagerRegistry viewManagers,
#if WINDOWS_UWP
                                          CoreDispatcher dispatcher,
#else
                                          Dispatcher notUsed,
#endif
                                          Action <List <int> > onDropView
                                          )
        {
            _viewManagers       = viewManagers;
            _layoutAnimator     = new LayoutAnimationController();
            _tagsToViews        = new Dictionary <int, DependencyObject>();
            _tagsToViewManagers = new Dictionary <int, IViewManager>();
            _rootTags           = new Dictionary <int, bool>();
            _rootViewManager    = new RootViewManager();
#if WINDOWS_UWP
            Dispatcher = dispatcher;
#endif
            _deletedTagsBatchReporter = new DeletedTagsBatchReporter(onDropView);
        }
コード例 #8
0
 /// <summary>
 /// Instantiates the <see cref="UIViewOperationQueueInstance"/>.
 /// </summary>
 /// <param name="reactContext">The React context.</param>
 /// <param name="viewManagers">
 /// The view manager registry.
 /// </param>
 public UIViewOperationQueue(ReactContext reactContext, ViewManagerRegistry viewManagers) :
     base(reactContext, new NativeViewHierarchyManager(viewManagers, DispatcherHelpers.MainDispatcher, null), ReactChoreographer.Instance)
 {
 }