2016-06-09 17:34:41 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-06-09 17:34:41 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-06-09 17:34:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import <CoreGraphics/CoreGraphics.h>
|
2017-03-28 16:08:51 +00:00
|
|
|
#import <Foundation/Foundation.h>
|
2016-11-23 15:47:52 +00:00
|
|
|
|
|
|
|
#import <React/RCTBridgeModule.h>
|
2016-06-09 17:34:41 +00:00
|
|
|
|
2017-04-24 11:27:37 +00:00
|
|
|
static CGFloat RCTSingleFrameInterval = 1.0 / 60.0;
|
|
|
|
|
2016-06-09 17:34:41 +00:00
|
|
|
@class RCTValueAnimatedNode;
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2016-10-21 11:20:01 +00:00
|
|
|
@protocol RCTAnimationDriver <NSObject>
|
2016-06-09 17:34:41 +00:00
|
|
|
|
|
|
|
@property (nonatomic, readonly) NSNumber *animationId;
|
2016-10-21 11:20:01 +00:00
|
|
|
@property (nonatomic, readonly) RCTValueAnimatedNode *valueNode;
|
2016-06-09 17:34:41 +00:00
|
|
|
@property (nonatomic, readonly) BOOL animationHasBegun;
|
|
|
|
@property (nonatomic, readonly) BOOL animationHasFinished;
|
|
|
|
|
|
|
|
- (instancetype)initWithId:(NSNumber *)animationId
|
2016-10-21 11:20:01 +00:00
|
|
|
config:(NSDictionary *)config
|
2016-06-09 17:34:41 +00:00
|
|
|
forNode:(RCTValueAnimatedNode *)valueNode
|
2016-10-21 11:20:01 +00:00
|
|
|
callBack:(nullable RCTResponseSenderBlock)callback;
|
2016-06-09 17:34:41 +00:00
|
|
|
|
|
|
|
- (void)startAnimation;
|
2017-03-28 16:08:51 +00:00
|
|
|
- (void)stepAnimationWithTime:(NSTimeInterval)currentTime;
|
2016-06-09 17:34:41 +00:00
|
|
|
- (void)stopAnimation;
|
2018-02-16 19:43:34 +00:00
|
|
|
- (void)resetAnimationConfig:(NSDictionary *)config;
|
2016-06-09 17:34:41 +00:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|
2016-11-28 19:09:46 +00:00
|
|
|
|
|
|
|
@end
|