Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit cdf7f70

Browse files
maickiHannah Troisi
authored andcommitted
[ASDimension] Simplify header file to focus on the most essential types for app developers. (#2794)
* First round of cleanups for ASDimension.mm/h * Add ASDimensionDeprecated and ASDimensionInternal to Copy Files build phase
1 parent c85aa11 commit cdf7f70

10 files changed

Lines changed: 414 additions & 356 deletions

AsyncDisplayKit.xcodeproj/project.pbxproj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,16 @@
203203
6907C2581DC4ECFE00374C66 /* ASObjectDescriptionHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 6907C2561DC4ECFE00374C66 /* ASObjectDescriptionHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; };
204204
6907C2591DC4ECFE00374C66 /* ASObjectDescriptionHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 6907C2571DC4ECFE00374C66 /* ASObjectDescriptionHelpers.m */; };
205205
6907C25A1DC4ECFE00374C66 /* ASObjectDescriptionHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 6907C2571DC4ECFE00374C66 /* ASObjectDescriptionHelpers.m */; };
206+
690C35611E055C5D00069B91 /* ASDimensionInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 690C35601E055C5D00069B91 /* ASDimensionInternal.mm */; };
207+
690C35621E055C5D00069B91 /* ASDimensionInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 690C35601E055C5D00069B91 /* ASDimensionInternal.mm */; };
208+
690C35641E055C7B00069B91 /* ASDimensionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 690C35631E055C7B00069B91 /* ASDimensionInternal.h */; settings = {ATTRIBUTES = (Public, ); }; };
209+
690C35661E0567C600069B91 /* ASDimensionDeprecated.mm in Sources */ = {isa = PBXBuildFile; fileRef = 690C35651E0567C600069B91 /* ASDimensionDeprecated.mm */; };
210+
690C35671E0567C600069B91 /* ASDimensionDeprecated.mm in Sources */ = {isa = PBXBuildFile; fileRef = 690C35651E0567C600069B91 /* ASDimensionDeprecated.mm */; };
211+
690C356B1E05680300069B91 /* ASDimensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 690C356A1E05680300069B91 /* ASDimensionDeprecated.h */; settings = {ATTRIBUTES = (Public, ); }; };
206212
69127CFE1DD2B387004BF6E2 /* ASEventLog.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 696F01EA1DD2AF450049FBD5 /* ASEventLog.h */; };
207213
693117CE1DC7C72700DE4784 /* ASDisplayNode+Deprecated.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 683489271D70DE3400327501 /* ASDisplayNode+Deprecated.h */; };
214+
693DA50F1E2536A600F66DF4 /* ASDimensionInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 690C35631E055C7B00069B91 /* ASDimensionInternal.h */; };
215+
693DA5141E25373100F66DF4 /* ASDimensionDeprecated.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 690C356A1E05680300069B91 /* ASDimensionDeprecated.h */; };
208216
69527B121DC84292004785FB /* ASLayoutElementStylePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 69527B111DC84292004785FB /* ASLayoutElementStylePrivate.h */; };
209217
6959433E1D70815300B0EE1F /* ASDisplayNodeLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6959433C1D70815300B0EE1F /* ASDisplayNodeLayout.mm */; };
210218
6959433F1D70815300B0EE1F /* ASDisplayNodeLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6959433C1D70815300B0EE1F /* ASDisplayNodeLayout.mm */; };
@@ -673,6 +681,8 @@
673681
dstPath = "include/$(PRODUCT_NAME)";
674682
dstSubfolderSpec = 16;
675683
files = (
684+
693DA5141E25373100F66DF4 /* ASDimensionDeprecated.h in CopyFiles */,
685+
693DA50F1E2536A600F66DF4 /* ASDimensionInternal.h in CopyFiles */,
676686
68C2155C1DE11AA80019C4BC /* ASObjectDescriptionHelpers.h in CopyFiles */,
677687
68C2155B1DE11A790019C4BC /* ASCollectionViewLayoutInspector.h in CopyFiles */,
678688
DEB8ED7E1DD007F400DBDE55 /* ASLayoutElementInspectorNode.h in CopyFiles */,
@@ -1003,6 +1013,10 @@
10031013
68FC85E81CE29C7D00EDD713 /* ASVisibilityProtocols.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASVisibilityProtocols.m; sourceTree = "<group>"; };
10041014
6907C2561DC4ECFE00374C66 /* ASObjectDescriptionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASObjectDescriptionHelpers.h; sourceTree = "<group>"; };
10051015
6907C2571DC4ECFE00374C66 /* ASObjectDescriptionHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASObjectDescriptionHelpers.m; sourceTree = "<group>"; };
1016+
690C35601E055C5D00069B91 /* ASDimensionInternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASDimensionInternal.mm; path = AsyncDisplayKit/Layout/ASDimensionInternal.mm; sourceTree = "<group>"; };
1017+
690C35631E055C7B00069B91 /* ASDimensionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASDimensionInternal.h; path = AsyncDisplayKit/Layout/ASDimensionInternal.h; sourceTree = "<group>"; };
1018+
690C35651E0567C600069B91 /* ASDimensionDeprecated.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASDimensionDeprecated.mm; path = AsyncDisplayKit/Layout/ASDimensionDeprecated.mm; sourceTree = "<group>"; };
1019+
690C356A1E05680300069B91 /* ASDimensionDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASDimensionDeprecated.h; path = AsyncDisplayKit/Layout/ASDimensionDeprecated.h; sourceTree = "<group>"; };
10061020
69527B111DC84292004785FB /* ASLayoutElementStylePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASLayoutElementStylePrivate.h; path = AsyncDisplayKit/Layout/ASLayoutElementStylePrivate.h; sourceTree = SOURCE_ROOT; };
10071021
6959433C1D70815300B0EE1F /* ASDisplayNodeLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDisplayNodeLayout.mm; sourceTree = "<group>"; };
10081022
6959433D1D70815300B0EE1F /* ASDisplayNodeLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDisplayNodeLayout.h; sourceTree = "<group>"; };
@@ -1731,6 +1745,10 @@
17311745
ACF6ED041B17843500DA7C62 /* ASCenterLayoutSpec.mm */,
17321746
ACF6ED071B17843500DA7C62 /* ASDimension.h */,
17331747
ACF6ED081B17843500DA7C62 /* ASDimension.mm */,
1748+
690C356A1E05680300069B91 /* ASDimensionDeprecated.h */,
1749+
690C35651E0567C600069B91 /* ASDimensionDeprecated.mm */,
1750+
690C35631E055C7B00069B91 /* ASDimensionInternal.h */,
1751+
690C35601E055C5D00069B91 /* ASDimensionInternal.mm */,
17341752
ACF6ED091B17843500DA7C62 /* ASInsetLayoutSpec.h */,
17351753
ACF6ED0A1B17843500DA7C62 /* ASInsetLayoutSpec.mm */,
17361754
ACF6ED0B1B17843500DA7C62 /* ASLayout.h */,
@@ -1808,6 +1826,8 @@
18081826
buildActionMask = 2147483647;
18091827
files = (
18101828
696F01EC1DD2AF450049FBD5 /* ASEventLog.h in Headers */,
1829+
690C35641E055C7B00069B91 /* ASDimensionInternal.h in Headers */,
1830+
690C356B1E05680300069B91 /* ASDimensionDeprecated.h in Headers */,
18111831
683489281D70DE3400327501 /* ASDisplayNode+Deprecated.h in Headers */,
18121832
6907C2581DC4ECFE00374C66 /* ASObjectDescriptionHelpers.h in Headers */,
18131833
69E0E8A71D356C9400627613 /* ASEqualityHelpers.h in Headers */,
@@ -2192,6 +2212,7 @@
21922212
8B0768B41CE752EC002E1453 /* ASDefaultPlaybackButton.m in Sources */,
21932213
E55D86321CA8A14000A0C26F /* ASLayoutElement.mm in Sources */,
21942214
68FC85E41CE29B7E00EDD713 /* ASTabBarController.m in Sources */,
2215+
690C35661E0567C600069B91 /* ASDimensionDeprecated.mm in Sources */,
21952216
058D0A23195D050800B7D73C /* _ASAsyncTransactionContainer.m in Sources */,
21962217
058D0A24195D050800B7D73C /* _ASAsyncTransactionGroup.m in Sources */,
21972218
68355B3A1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m in Sources */,
@@ -2296,6 +2317,7 @@
22962317
92074A691CC8BADA00918F75 /* ASControlNode+tvOS.m in Sources */,
22972318
ACF6ED321B17843500DA7C62 /* ASAbsoluteLayoutSpec.mm in Sources */,
22982319
AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.mm in Sources */,
2320+
690C35611E055C5D00069B91 /* ASDimensionInternal.mm in Sources */,
22992321
68355B311CB5799E001D4E68 /* ASImageNode+AnimatedImage.mm in Sources */,
23002322
68C215591DE10D330019C4BC /* ASCollectionViewLayoutInspector.m in Sources */,
23012323
9CFFC6C01CCAC73C006A6476 /* ASViewController.mm in Sources */,
@@ -2383,6 +2405,7 @@
23832405
9C70F2091CDABA36007D6C76 /* ASViewController.mm in Sources */,
23842406
8BBBAB8D1CEBAF1E00107FC6 /* ASDefaultPlaybackButton.m in Sources */,
23852407
B30BF6541C59D889004FCD53 /* ASLayoutManager.m in Sources */,
2408+
690C35671E0567C600069B91 /* ASDimensionDeprecated.mm in Sources */,
23862409
92DD2FE71BF4D0850074C9DD /* ASMapNode.mm in Sources */,
23872410
636EA1A51C7FF4EF00EE152F /* ASDefaultPlayButton.m in Sources */,
23882411
9B92C8861BC2EB7600EE46B2 /* ASCollectionViewFlowLayoutInspector.m in Sources */,
@@ -2487,6 +2510,7 @@
24872510
AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.mm in Sources */,
24882511
34EFC7741B701D0A00AD841F /* ASAbsoluteLayoutSpec.mm in Sources */,
24892512
92074A6A1CC8BADA00918F75 /* ASControlNode+tvOS.m in Sources */,
2513+
690C35621E055C5D00069B91 /* ASDimensionInternal.mm in Sources */,
24902514
68C2155A1DE10D330019C4BC /* ASCollectionViewLayoutInspector.m in Sources */,
24912515
DB78412E1C6BCE1600A9E2B4 /* _ASTransitionContext.m in Sources */,
24922516
B350620B1B010EFD0018CF92 /* ASTableView.mm in Sources */,

AsyncDisplayKit/AsyncDisplayKit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
#import <AsyncDisplayKit/ASLayout.h>
5050
#import <AsyncDisplayKit/ASDimension.h>
51+
#import <AsyncDisplayKit/ASDimensionInternal.h>
52+
#import <AsyncDisplayKit/ASDimensionDeprecated.h>
5153
#import <AsyncDisplayKit/ASEnvironment.h>
5254
#import <AsyncDisplayKit/ASLayoutElement.h>
5355
#import <AsyncDisplayKit/ASLayoutSpec.h>

AsyncDisplayKit/Layout/ASAbsoluteLayoutElement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010

1111
#import <AsyncDisplayKit/ASBaseDefines.h>
12-
#import <AsyncDisplayKit/ASDimension.h>
12+
#import <AsyncDisplayKit/ASDimensionDeprecated.h>
1313

1414
NS_ASSUME_NONNULL_BEGIN
1515

AsyncDisplayKit/Layout/ASDimension.h

Lines changed: 25 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
#import <AsyncDisplayKit/ASBaseDefines.h>
1414
#import <AsyncDisplayKit/ASAssert.h>
1515

16+
ASDISPLAYNODE_EXTERN_C_BEGIN
17+
NS_ASSUME_NONNULL_BEGIN
18+
19+
#pragma mark -
20+
1621
ASDISPLAYNODE_INLINE BOOL AS_WARN_UNUSED_RESULT ASPointsValidForLayout(CGFloat points)
1722
{
1823
return ((isnormal(points) || points == 0.0) && points >= 0.0 && points < (CGFLOAT_MAX / 2.0));
@@ -33,6 +38,8 @@ ASDISPLAYNODE_INLINE BOOL AS_WARN_UNUSED_RESULT ASIsCGSizeValidForSize(CGSize si
3338
return (ASPointsValidForSize(size.width) && ASPointsValidForSize(size.height));
3439
}
3540

41+
#pragma mark - ASDimension
42+
3643
/**
3744
* A dimension relative to constraints to be provided in the future.
3845
* A ASDimension can be one of three types:
@@ -58,42 +65,10 @@ typedef struct {
5865
} ASDimension;
5966

6067
/**
61-
* Expresses an inclusive range of sizes. Used to provide a simple constraint to layout.
68+
* Represents auto as ASDimension
6269
*/
63-
typedef struct {
64-
CGSize min;
65-
CGSize max;
66-
} ASSizeRange;
67-
68-
/**
69-
* A struct specifying a ASLayoutElement's size. Example:
70-
*
71-
* ASLayoutElementSize size = (ASLayoutElementSize){
72-
* .width = ASDimensionMakeWithFraction(0.25),
73-
* .maxWidth = ASDimensionMakeWithPoints(200),
74-
* .minHeight = ASDimensionMakeWithFraction(0.50)
75-
* };
76-
*
77-
* Description: <ASLayoutElementSize: exact={25%, Auto}, min={Auto, 50%}, max={200pt, Auto}>
78-
*
79-
*/
80-
typedef struct {
81-
ASDimension width;
82-
ASDimension height;
83-
ASDimension minWidth;
84-
ASDimension maxWidth;
85-
ASDimension minHeight;
86-
ASDimension maxHeight;
87-
} ASLayoutElementSize;
88-
8970
extern ASDimension const ASDimensionAuto;
9071

91-
ASDISPLAYNODE_EXTERN_C_BEGIN
92-
NS_ASSUME_NONNULL_BEGIN
93-
94-
95-
#pragma mark - ASDimension
96-
9772
/**
9873
* Returns a dimension with the specified type and value.
9974
*/
@@ -173,15 +148,6 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT CGFloat ASDimensionResolve(ASDimensio
173148
}
174149
}
175150

176-
177-
#pragma mark - NSNumber+ASDimension
178-
179-
@interface NSNumber (ASDimension)
180-
@property (nonatomic, readonly) ASDimension as_pointDimension;
181-
@property (nonatomic, readonly) ASDimension as_fractionDimension;
182-
@end
183-
184-
185151
#pragma mark - ASLayoutSize
186152

187153
/**
@@ -205,6 +171,15 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASLayoutSize ASLayoutSizeMake(ASDimen
205171
return size;
206172
}
207173

174+
/**
175+
* Resolve this relative size relative to a parent size.
176+
*/
177+
ASDISPLAYNODE_INLINE CGSize ASLayoutSizeResolveSize(ASLayoutSize layoutSize, CGSize parentSize, CGSize autoSize)
178+
{
179+
return CGSizeMake(ASDimensionResolve(layoutSize.width, parentSize.width, autoSize.width),
180+
ASDimensionResolve(layoutSize.height, parentSize.height, autoSize.height));
181+
}
182+
208183
/*
209184
* Returns a string representation of a relative size.
210185
*/
@@ -217,6 +192,14 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT NSString *NSStringFromASLayoutSize(AS
217192

218193
#pragma mark - ASSizeRange
219194

195+
/**
196+
* Expresses an inclusive range of sizes. Used to provide a simple constraint to layout.
197+
*/
198+
typedef struct {
199+
CGSize min;
200+
CGSize max;
201+
} ASSizeRange;
202+
220203
/**
221204
* Creates an ASSizeRange with provided min and max size.
222205
*/
@@ -272,149 +255,5 @@ ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASSizeRangeEqualToSizeRange(ASSi
272255
*/
273256
extern AS_WARN_UNUSED_RESULT NSString *NSStringFromASSizeRange(ASSizeRange sizeRange);
274257

275-
276-
#pragma mark - ASLayoutElementSize
277-
278-
/**
279-
* Returns an ASLayoutElementSize with default values.
280-
*/
281-
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASLayoutElementSize ASLayoutElementSizeMake()
282-
{
283-
return (ASLayoutElementSize){
284-
.width = ASDimensionAuto,
285-
.height = ASDimensionAuto,
286-
.minWidth = ASDimensionAuto,
287-
.maxWidth = ASDimensionAuto,
288-
.minHeight = ASDimensionAuto,
289-
.maxHeight = ASDimensionAuto
290-
};
291-
}
292-
293-
/**
294-
* Returns an ASLayoutElementSize with the specified CGSize values as width and height.
295-
*/
296-
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASLayoutElementSize ASLayoutElementSizeMakeFromCGSize(CGSize size)
297-
{
298-
ASLayoutElementSize s = ASLayoutElementSizeMake();
299-
s.width = ASDimensionMakeWithPoints(size.width);
300-
s.height = ASDimensionMakeWithPoints(size.height);
301-
return s;
302-
}
303-
304-
/**
305-
* Returns whether two sizes are equal.
306-
*/
307-
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT BOOL ASLayoutElementSizeEqualToLayoutElementSize(ASLayoutElementSize lhs, ASLayoutElementSize rhs)
308-
{
309-
return (ASDimensionEqualToDimension(lhs.width, rhs.width)
310-
&& ASDimensionEqualToDimension(lhs.height, rhs.height)
311-
&& ASDimensionEqualToDimension(lhs.minWidth, rhs.minWidth)
312-
&& ASDimensionEqualToDimension(lhs.maxWidth, rhs.maxWidth)
313-
&& ASDimensionEqualToDimension(lhs.minHeight, rhs.minHeight)
314-
&& ASDimensionEqualToDimension(lhs.maxHeight, rhs.maxHeight));
315-
}
316-
317-
/**
318-
* Returns a string formatted to contain the data from an ASLayoutElementSize.
319-
*/
320-
extern AS_WARN_UNUSED_RESULT NSString *NSStringFromASLayoutElementSize(ASLayoutElementSize size);
321-
322-
/**
323-
* Resolve the given size relative to a parent size and an auto size.
324-
* From the given size uses width, height to resolve the exact size constraint, uses the minHeight and minWidth to
325-
* resolve the min size constraint and the maxHeight and maxWidth to resolve the max size constraint. For every
326-
* dimension with unit ASDimensionUnitAuto the given autoASSizeRange value will be used.
327-
* Based on the calculated exact, min and max size constraints the final size range will be calculated.
328-
*/
329-
extern AS_WARN_UNUSED_RESULT ASSizeRange ASLayoutElementSizeResolveAutoSize(ASLayoutElementSize size, const CGSize parentSize, ASSizeRange autoASSizeRange);
330-
331-
/**
332-
* Resolve the given size to a parent size. Uses internally ASLayoutElementSizeResolveAutoSize with {INFINITY, INFINITY} as
333-
* as autoASSizeRange. For more information look at ASLayoutElementSizeResolveAutoSize.
334-
*/
335-
ASDISPLAYNODE_INLINE AS_WARN_UNUSED_RESULT ASSizeRange ASLayoutElementSizeResolve(ASLayoutElementSize size, const CGSize parentSize)
336-
{
337-
return ASLayoutElementSizeResolveAutoSize(size, parentSize, ASSizeRangeMake(CGSizeZero, CGSizeMake(INFINITY, INFINITY)));
338-
}
339-
340-
341-
#pragma mark - Deprecated
342-
343-
/**
344-
* A dimension relative to constraints to be provided in the future.
345-
* A ASDimension can be one of three types:
346-
*
347-
* "Auto" - This indicated "I have no opinion" and may be resolved in whatever way makes most sense given the circumstances.
348-
*
349-
* "Points" - Just a number. It will always resolve to exactly this amount.
350-
*
351-
* "Percent" - Multiplied to a provided parent amount to resolve a final amount.
352-
*/
353-
typedef NS_ENUM(NSInteger, ASRelativeDimensionType) {
354-
/** This indicates "I have no opinion" and may be resolved in whatever way makes most sense given the circumstances. */
355-
ASRelativeDimensionTypeAuto,
356-
/** Just a number. It will always resolve to exactly this amount. This is the default type. */
357-
ASRelativeDimensionTypePoints,
358-
/** Multiplied to a provided parent amount to resolve a final amount. */
359-
ASRelativeDimensionTypeFraction,
360-
};
361-
362-
#define ASRelativeDimension ASDimension
363-
#define ASRelativeSize ASLayoutSize
364-
#define ASRelativeDimensionMakeWithPoints ASDimensionMakeWithPoints
365-
#define ASRelativeDimensionMakeWithFraction ASDimensionMakeWithFraction
366-
367-
/**
368-
* Function is deprecated. Use ASSizeRangeMake instead.
369-
*/
370-
extern AS_WARN_UNUSED_RESULT ASSizeRange ASSizeRangeMakeExactSize(CGSize size) ASDISPLAYNODE_DEPRECATED_MSG("Use ASSizeRangeMake instead.");
371-
372-
/**
373-
Expresses an inclusive range of relative sizes. Used to provide additional constraint to layout.
374-
Used by ASStaticLayoutSpec.
375-
*/
376-
typedef struct {
377-
ASLayoutSize min;
378-
ASLayoutSize max;
379-
} ASRelativeSizeRange;
380-
381-
extern ASRelativeSizeRange const ASRelativeSizeRangeUnconstrained;
382-
383-
#pragma mark - ASRelativeDimension
384-
385-
extern ASDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value) ASDISPLAYNODE_DEPRECATED;
386-
387-
#pragma mark - ASRelativeSize
388-
389-
extern ASLayoutSize ASRelativeSizeMake(ASRelativeDimension width, ASRelativeDimension height) ASDISPLAYNODE_DEPRECATED;
390-
391-
/** Convenience constructor to provide size in points. */
392-
extern ASLayoutSize ASRelativeSizeMakeWithCGSize(CGSize size) ASDISPLAYNODE_DEPRECATED;
393-
394-
/** Convenience constructor to provide size as a fraction. */
395-
extern ASLayoutSize ASRelativeSizeMakeWithFraction(CGFloat fraction) ASDISPLAYNODE_DEPRECATED;
396-
397-
extern BOOL ASRelativeSizeEqualToRelativeSize(ASLayoutSize lhs, ASLayoutSize rhs) ASDISPLAYNODE_DEPRECATED;
398-
399-
extern NSString *NSStringFromASRelativeSize(ASLayoutSize size) ASDISPLAYNODE_DEPRECATED;
400-
401-
#pragma mark - ASRelativeSizeRange
402-
403-
extern ASRelativeSizeRange ASRelativeSizeRangeMake(ASLayoutSize min, ASLayoutSize max) ASDISPLAYNODE_DEPRECATED;
404-
405-
#pragma mark Convenience constructors to provide an exact size (min == max).
406-
extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeSize(ASLayoutSize exact) ASDISPLAYNODE_DEPRECATED;
407-
408-
extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactCGSize(CGSize exact) ASDISPLAYNODE_DEPRECATED;
409-
410-
extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactFraction(CGFloat fraction) ASDISPLAYNODE_DEPRECATED;
411-
412-
extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeDimensions(ASRelativeDimension exactWidth, ASRelativeDimension exactHeight) ASDISPLAYNODE_DEPRECATED;
413-
414-
extern BOOL ASRelativeSizeRangeEqualToRelativeSizeRange(ASRelativeSizeRange lhs, ASRelativeSizeRange rhs) ASDISPLAYNODE_DEPRECATED;
415-
416-
/** Provided a parent size, compute final dimensions for this RelativeSizeRange to arrive at a SizeRange. */
417-
extern ASSizeRange ASRelativeSizeRangeResolve(ASRelativeSizeRange relativeSizeRange, CGSize parentSize) ASDISPLAYNODE_DEPRECATED;
418-
419258
NS_ASSUME_NONNULL_END
420259
ASDISPLAYNODE_EXTERN_C_END

0 commit comments

Comments
 (0)