Swiftgram/AsyncDisplayKit/Details/ASLayoutController.h
Michael Schneider d9be4783e5 [ASLayout] General Layout Cleanup (#2920)
* Remove duplicate import

* Move `ASLayoutController` related code out of CoreGraphics+ASConvenience

* Further cleanup

* Move private layout files to Privat/Layout

* Move ASLayoutElementStylePrivate into Private/Layout

* Further cleanup

* Move tvOS related files to tvOS folder

* Further cleanup
2017-01-24 11:54:05 -08:00

54 lines
1.6 KiB
Objective-C

//
// ASLayoutController.h
// AsyncDisplayKit
//
// Copyright (c) 2014-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 <UIKit/UIKit.h>
#import <AsyncDisplayKit/ASBaseDefines.h>
#import <AsyncDisplayKit/ASLayoutRangeType.h>
#import <AsyncDisplayKit/ASScrollDirection.h>
NS_ASSUME_NONNULL_BEGIN
@class ASCellNode;
ASDISPLAYNODE_EXTERN_C_BEGIN
typedef struct {
CGFloat leadingBufferScreenfuls;
CGFloat trailingBufferScreenfuls;
} ASRangeTuningParameters;
struct ASDirectionalScreenfulBuffer {
CGFloat positiveDirection; // Positive relative to iOS Core Animation layer coordinate space.
CGFloat negativeDirection;
};
typedef struct ASDirectionalScreenfulBuffer ASDirectionalScreenfulBuffer;
ASDISPLAYNODE_EXTERN_C_END
@protocol ASLayoutController <NSObject>
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType;
- (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType;
- (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection rangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType;
@optional
- (void)setVisibleNodeIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
- (void)setViewportSize:(CGSize)viewportSize;
- (CGSize)viewportSize;
@end
NS_ASSUME_NONNULL_END