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>
|
2016-11-23 15:47:52 +00:00
|
|
|
|
|
|
|
#import <React/RCTBridgeModule.h>
|
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;
|
|
|
|
- (void)stopAnimation;
|
|
|
|
- (void)stepAnimation;
|
|
|
|
- (void)removeAnimation;
|
|
|
|
- (void)cleanupAnimationUpdate;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|