mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 06:38:13 +00:00
Summary: Size constraints are essential part of the running Surface, decoupling them from starting process means that we will have to perform additional commit later. This and previous couple diffs fix a problem with initial zero size of the surface and following visible "jumpy" relayout. Reviewed By: sahrens Differential Revision: D10174280 fbshipit-source-id: 0ec48692cb814fd46cc3a1d044c5eb8ab9ecb031
67 lines
2.2 KiB
Objective-C
67 lines
2.2 KiB
Objective-C
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <memory>
|
|
|
|
#import <React/RCTPrimitives.h>
|
|
#import <fabric/core/LayoutConstraints.h>
|
|
#import <fabric/core/LayoutContext.h>
|
|
#import <fabric/uimanager/FabricUIManager.h>
|
|
#import <fabric/uimanager/ShadowViewMutation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class RCTMountingManager;
|
|
|
|
/**
|
|
* Exactly same semantic as `facebook::react::SchedulerDelegate`.
|
|
*/
|
|
@protocol RCTSchedulerDelegate
|
|
|
|
- (void)schedulerDidFinishTransaction:(facebook::react::ShadowViewMutationList)mutations
|
|
rootTag:(ReactTag)rootTag;
|
|
|
|
- (void)schedulerDidRequestPreliminaryViewAllocationWithComponentName:(NSString *)componentName;
|
|
|
|
@end
|
|
|
|
/**
|
|
* `facebook::react::Scheduler` as an Objective-C class.
|
|
*/
|
|
@interface RCTScheduler : NSObject
|
|
|
|
@property (atomic, weak, nullable) id<RCTSchedulerDelegate> delegate;
|
|
|
|
- (instancetype)initWithContextContainer:(std::shared_ptr<void>)contextContatiner;
|
|
|
|
- (void)startSurfaceWithSurfaceId:(facebook::react::SurfaceId)surfaceId
|
|
moduleName:(NSString *)moduleName
|
|
initailProps:(NSDictionary *)initialProps
|
|
layoutConstraints:(facebook::react::LayoutConstraints)layoutConstraints
|
|
layoutContext:(facebook::react::LayoutContext)layoutContext;
|
|
|
|
- (void)stopSurfaceWithSurfaceId:(facebook::react::SurfaceId)surfaceId;
|
|
|
|
- (CGSize)measureSurfaceWithLayoutConstraints:(facebook::react::LayoutConstraints)layoutConstraints
|
|
layoutContext:(facebook::react::LayoutContext)layoutContext
|
|
surfaceId:(facebook::react::SurfaceId)surfaceId;
|
|
|
|
- (void)constraintSurfaceLayoutWithLayoutConstraints:(facebook::react::LayoutConstraints)layoutConstraints
|
|
layoutContext:(facebook::react::LayoutContext)layoutContext
|
|
surfaceId:(facebook::react::SurfaceId)surfaceId;
|
|
|
|
@end
|
|
|
|
@interface RCTScheduler (Deprecated)
|
|
|
|
- (std::shared_ptr<facebook::react::FabricUIManager>)uiManager_DO_NOT_USE;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|