2016-06-09 17:34:41 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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;
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|
2016-11-28 19:09:46 +00:00
|
|
|
|
|
|
|
@end
|