BVB Source Codes

AsyncDisplayKit Show ASDimensionDeprecated.h Source code

Return Download AsyncDisplayKit: download ASDimensionDeprecated.h Source code - Download AsyncDisplayKit Source code - Type:.h
  1. //
  2. //  ASDimensionDeprecated.h
  3. //  AsyncDisplayKit
  4. //
  5. //  Copyright (c) 2014-present, Facebook, Inc.  All rights reserved.
  6. //  This source code is licensed under the BSD-style license found in the
  7. //  LICENSE file in the root directory of this source tree. An additional grant
  8. //  of patent rights can be found in the PATENTS file in the same directory.
  9. //
  10.  
  11. #pragma once
  12. #import <AsyncDisplayKit/ASBaseDefines.h>
  13. #import <AsyncDisplayKit/ASDimension.h>
  14.  
  15. ASDISPLAYNODE_EXTERN_C_BEGIN
  16. NS_ASSUME_NONNULL_BEGIN
  17.  
  18. /**
  19.  * A dimension relative to constraints to be provided in the future.
  20.  * A ASDimension can be one of three types:
  21.  *
  22.  * "Auto" - This indicated "I have no opinion" and may be resolved in whatever way makes most sense given the circumstances.
  23.  *
  24.  * "Points" - Just a number. It will always resolve to exactly this amount.
  25.  *
  26.  * "Percent" - Multiplied to a provided parent amount to resolve a final amount.
  27.  */
  28. typedef NS_ENUM(NSInteger, ASRelativeDimensionType) {
  29.   /** This indicates "I have no opinion" and may be resolved in whatever way makes most sense given the circumstances. */
  30.   ASRelativeDimensionTypeAuto,
  31.   /** Just a number. It will always resolve to exactly this amount. This is the default type. */
  32.   ASRelativeDimensionTypePoints,
  33.   /** Multiplied to a provided parent amount to resolve a final amount. */
  34.   ASRelativeDimensionTypeFraction,
  35. };
  36.  
  37. #define ASRelativeDimension ASDimension
  38. #define ASRelativeSize ASLayoutSize
  39. #define ASRelativeDimensionMakeWithPoints ASDimensionMakeWithPoints
  40. #define ASRelativeDimensionMakeWithFraction ASDimensionMakeWithFraction
  41.  
  42. /**
  43.  * Function is deprecated. Use ASSizeRangeMake instead.
  44.  */
  45. extern AS_WARN_UNUSED_RESULT ASSizeRange ASSizeRangeMakeExactSize(CGSize size) ASDISPLAYNODE_DEPRECATED_MSG("Use ASSizeRangeMake instead.");
  46.  
  47. /**
  48.  Expresses an inclusive range of relative sizes. Used to provide additional constraint to layout.
  49.  Used by ASStaticLayoutSpec.
  50.  */
  51. typedef struct {
  52.   ASLayoutSize min;
  53.   ASLayoutSize max;
  54. } ASRelativeSizeRange;
  55.  
  56. extern ASRelativeSizeRange const ASRelativeSizeRangeUnconstrained;
  57.  
  58. #pragma mark - ASRelativeDimension
  59.  
  60. extern ASDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value) ASDISPLAYNODE_DEPRECATED;
  61.  
  62. #pragma mark - ASRelativeSize
  63.  
  64. extern ASLayoutSize ASRelativeSizeMake(ASRelativeDimension width, ASRelativeDimension height) ASDISPLAYNODE_DEPRECATED;
  65.  
  66. /** Convenience constructor to provide size in points. */
  67. extern ASLayoutSize ASRelativeSizeMakeWithCGSize(CGSize size) ASDISPLAYNODE_DEPRECATED;
  68.  
  69. /** Convenience constructor to provide size as a fraction. */
  70. extern ASLayoutSize ASRelativeSizeMakeWithFraction(CGFloat fraction) ASDISPLAYNODE_DEPRECATED;
  71.  
  72. extern BOOL ASRelativeSizeEqualToRelativeSize(ASLayoutSize lhs, ASLayoutSize rhs) ASDISPLAYNODE_DEPRECATED;
  73.  
  74. extern NSString *NSStringFromASRelativeSize(ASLayoutSize size) ASDISPLAYNODE_DEPRECATED;
  75.  
  76. #pragma mark - ASRelativeSizeRange
  77.  
  78. extern ASRelativeSizeRange ASRelativeSizeRangeMake(ASLayoutSize min, ASLayoutSize max) ASDISPLAYNODE_DEPRECATED;
  79.  
  80. #pragma mark Convenience constructors to provide an exact size (min == max).
  81. extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeSize(ASLayoutSize exact) ASDISPLAYNODE_DEPRECATED;
  82.  
  83. extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactCGSize(CGSize exact) ASDISPLAYNODE_DEPRECATED;
  84.  
  85. extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactFraction(CGFloat fraction) ASDISPLAYNODE_DEPRECATED;
  86.  
  87. extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeDimensions(ASRelativeDimension exactWidth, ASRelativeDimension exactHeight) ASDISPLAYNODE_DEPRECATED;
  88.  
  89. extern BOOL ASRelativeSizeRangeEqualToRelativeSizeRange(ASRelativeSizeRange lhs, ASRelativeSizeRange rhs) ASDISPLAYNODE_DEPRECATED;
  90.  
  91. /** Provided a parent size, compute final dimensions for this RelativeSizeRange to arrive at a SizeRange. */
  92. extern ASSizeRange ASRelativeSizeRangeResolve(ASRelativeSizeRange relativeSizeRange, CGSize parentSize) ASDISPLAYNODE_DEPRECATED;
  93.  
  94. NS_ASSUME_NONNULL_END
  95. ASDISPLAYNODE_EXTERN_C_END
  96.  
downloadASDimensionDeprecated.h Source code - Download AsyncDisplayKit Source code
Related Source Codes/Software:
lottie-android - Render After Effects animations natively on Androi... 2017-06-07
parse-server - Parse-compatible API server module for Node/Expres... 2017-06-07
react-boilerplate - 2017-06-07
webtorrent - Streaming torrent client for the web ... 2017-06-06
ionicons - The premium icon font for Ionic ... 2017-06-07
storybook - 2017-06-07
prettier - Prettier is an opinionated JavaScript formatter. ... 2017-06-08
inferno - An extremely fast, React-like JavaScript library f... 2017-06-08
guetzli - Perceptual JPEG encoder 2017-06-08
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top