LOTValueCallback.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // LOTValueCallback.h
  3. // Lottie
  4. //
  5. // Created by brandon_withrow on 12/15/17.
  6. // Copyright © 2017 Airbnb. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <CoreGraphics/CoreGraphics.h>
  10. #import "LOTValueDelegate.h"
  11. /*!
  12. @brief LOTColorValueCallback is a container for a CGColorRef. This container is a LOTColorValueDelegate that always returns the colorValue property to its animation delegate.
  13. @discussion LOTColorValueCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeypath to set a color value of an animation property.
  14. */
  15. @interface LOTColorValueCallback : NSObject <LOTColorValueDelegate>
  16. + (instancetype _Nonnull)withCGColor:(CGColorRef _Nonnull)color NS_SWIFT_NAME(init(color:));
  17. @property (nonatomic, nonnull) CGColorRef colorValue;
  18. @end
  19. /*!
  20. @brief LOTNumberValueCallback is a container for a CGFloat value. This container is a LOTNumberValueDelegate that always returns the numberValue property to its animation delegate.
  21. @discussion LOTNumberValueCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeypath to set a number value of an animation property.
  22. */
  23. @interface LOTNumberValueCallback : NSObject <LOTNumberValueDelegate>
  24. + (instancetype _Nonnull)withFloatValue:(CGFloat)numberValue NS_SWIFT_NAME(init(number:));
  25. @property (nonatomic, assign) CGFloat numberValue;
  26. @end
  27. /*!
  28. @brief LOTPointValueCallback is a container for a CGPoint value. This container is a LOTPointValueDelegate that always returns the pointValue property to its animation delegate.
  29. @discussion LOTPointValueCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeypath to set a point value of an animation property.
  30. */
  31. @interface LOTPointValueCallback : NSObject <LOTPointValueDelegate>
  32. + (instancetype _Nonnull)withPointValue:(CGPoint)pointValue;
  33. @property (nonatomic, assign) CGPoint pointValue;
  34. @end
  35. /*!
  36. @brief LOTSizeValueCallback is a container for a CGSize value. This container is a LOTSizeValueDelegate that always returns the sizeValue property to its animation delegate.
  37. @discussion LOTSizeValueCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeypath to set a size value of an animation property.
  38. */
  39. @interface LOTSizeValueCallback : NSObject <LOTSizeValueDelegate>
  40. + (instancetype _Nonnull)withPointValue:(CGSize)sizeValue NS_SWIFT_NAME(init(size:));
  41. @property (nonatomic, assign) CGSize sizeValue;
  42. @end
  43. /*!
  44. @brief LOTPathValueCallback is a container for a CGPathRef value. This container is a LOTPathValueDelegate that always returns the pathValue property to its animation delegate.
  45. @discussion LOTPathValueCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeypath to set a path value of an animation property.
  46. */
  47. @interface LOTPathValueCallback : NSObject <LOTPathValueDelegate>
  48. + (instancetype _Nonnull)withCGPath:(CGPathRef _Nonnull)path NS_SWIFT_NAME(init(path:));
  49. @property (nonatomic, nonnull) CGPathRef pathValue;
  50. @end