2019-10-16 20:03:47 +03:00
|
|
|
/*
|
2018-09-12 01:27:47 +03:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-04-11 02:37:01 +03:00
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
|
2019-08-08 17:13:22 +03:00
|
|
|
#import <React/RCTPrimitives.h>
|
2020-04-19 00:51:46 +03:00
|
|
|
#import <react/componentregistry/ComponentDescriptorFactory.h>
|
2019-02-25 23:22:24 +03:00
|
|
|
#import <react/core/ComponentDescriptor.h>
|
2018-11-11 01:19:08 +03:00
|
|
|
#import <react/core/LayoutConstraints.h>
|
|
|
|
#import <react/core/LayoutContext.h>
|
2019-05-04 01:05:26 +03:00
|
|
|
#import <react/mounting/MountingCoordinator.h>
|
2020-04-19 00:51:46 +03:00
|
|
|
#import <react/scheduler/SchedulerToolbox.h>
|
2019-04-16 17:23:05 +03:00
|
|
|
#import <react/utils/ContextContainer.h>
|
2018-04-11 02:37:01 +03:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2019-08-08 17:13:22 +03:00
|
|
|
@class RCTMountingManager;
|
2018-04-11 02:37:01 +03:00
|
|
|
|
|
|
|
/**
|
2018-06-30 05:57:43 +03:00
|
|
|
* Exactly same semantic as `facebook::react::SchedulerDelegate`.
|
2018-04-11 02:37:01 +03:00
|
|
|
*/
|
2019-08-08 17:13:22 +03:00
|
|
|
@protocol RCTSchedulerDelegate
|
2018-04-11 02:37:01 +03:00
|
|
|
|
2019-05-04 01:05:26 +03:00
|
|
|
- (void)schedulerDidFinishTransaction:(facebook::react::MountingCoordinator::Shared const &)mountingCoordinator;
|
2018-04-11 02:37:01 +03:00
|
|
|
|
2019-07-19 21:45:40 +03:00
|
|
|
- (void)schedulerDidDispatchCommand:(facebook::react::ShadowView const &)shadowView
|
|
|
|
commandName:(std::string const &)commandName
|
|
|
|
args:(folly::dynamic const)args;
|
|
|
|
|
2018-04-11 02:37:01 +03:00
|
|
|
@end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* `facebook::react::Scheduler` as an Objective-C class.
|
|
|
|
*/
|
2019-08-08 17:13:22 +03:00
|
|
|
@interface RCTScheduler : NSObject
|
2018-04-11 02:37:01 +03:00
|
|
|
|
2019-08-08 17:13:22 +03:00
|
|
|
@property (atomic, weak, nullable) id<RCTSchedulerDelegate> delegate;
|
2018-04-11 02:37:01 +03:00
|
|
|
|
2019-06-07 22:00:01 +03:00
|
|
|
- (instancetype)initWithToolbox:(facebook::react::SchedulerToolbox)toolbox;
|
2018-09-24 22:54:26 +03:00
|
|
|
|
2018-09-26 20:02:04 +03:00
|
|
|
- (void)startSurfaceWithSurfaceId:(facebook::react::SurfaceId)surfaceId
|
|
|
|
moduleName:(NSString *)moduleName
|
2019-03-13 05:53:44 +03:00
|
|
|
initialProps:(NSDictionary *)initialProps
|
2018-10-10 02:25:08 +03:00
|
|
|
layoutConstraints:(facebook::react::LayoutConstraints)layoutConstraints
|
|
|
|
layoutContext:(facebook::react::LayoutContext)layoutContext;
|
2018-04-11 02:37:01 +03:00
|
|
|
|
2018-09-26 20:02:04 +03:00
|
|
|
- (void)stopSurfaceWithSurfaceId:(facebook::react::SurfaceId)surfaceId;
|
2018-04-11 02:37:01 +03:00
|
|
|
|
2018-09-26 20:02:04 +03:00
|
|
|
- (CGSize)measureSurfaceWithLayoutConstraints:(facebook::react::LayoutConstraints)layoutConstraints
|
2018-05-09 08:56:27 +03:00
|
|
|
layoutContext:(facebook::react::LayoutContext)layoutContext
|
2018-09-26 20:02:04 +03:00
|
|
|
surfaceId:(facebook::react::SurfaceId)surfaceId;
|
|
|
|
|
2018-10-10 02:25:03 +03:00
|
|
|
- (void)constraintSurfaceLayoutWithLayoutConstraints:(facebook::react::LayoutConstraints)layoutConstraints
|
2018-09-26 20:02:04 +03:00
|
|
|
layoutContext:(facebook::react::LayoutContext)layoutContext
|
|
|
|
surfaceId:(facebook::react::SurfaceId)surfaceId;
|
2018-05-09 08:56:27 +03:00
|
|
|
|
2019-12-07 04:56:37 +03:00
|
|
|
- (facebook::react::ComponentDescriptor const *)findComponentDescriptorByHandle_DO_NOT_USE_THIS_IS_BROKEN:
|
|
|
|
(facebook::react::ComponentHandle)handle;
|
2019-02-25 23:22:24 +03:00
|
|
|
|
2020-01-30 21:09:06 +03:00
|
|
|
- (facebook::react::MountingCoordinator::Shared)mountingCoordinatorWithSurfaceId:(facebook::react::SurfaceId)surfaceId;
|
|
|
|
|
2020-05-21 05:40:00 +03:00
|
|
|
- (void)onAnimationStarted;
|
|
|
|
|
|
|
|
- (void)onAllAnimationsComplete;
|
|
|
|
|
|
|
|
- (void)animationTick;
|
|
|
|
|
2018-04-11 02:37:01 +03:00
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|