mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-11 06:55:23 +00:00
49 lines
1.7 KiB
Objective-C
49 lines
1.7 KiB
Objective-C
//
|
|
// CGRect+ASConvenience.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 <Foundation/Foundation.h>
|
|
#import <CoreGraphics/CoreGraphics.h>
|
|
|
|
#import "ASBaseDefines.h"
|
|
#import "ASLayoutController.h"
|
|
|
|
#ifndef CGFLOAT_EPSILON
|
|
#if CGFLOAT_IS_DOUBLE
|
|
#define CGFLOAT_EPSILON DBL_EPSILON
|
|
#else
|
|
#define CGFLOAT_EPSILON FLT_EPSILON
|
|
#endif
|
|
#endif
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
ASDISPLAYNODE_EXTERN_C_BEGIN
|
|
|
|
struct ASDirectionalScreenfulBuffer {
|
|
CGFloat positiveDirection; // Positive relative to iOS Core Animation layer coordinate space.
|
|
CGFloat negativeDirection;
|
|
};
|
|
typedef struct ASDirectionalScreenfulBuffer ASDirectionalScreenfulBuffer;
|
|
|
|
ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferHorizontal(ASScrollDirection scrollDirection,
|
|
ASRangeTuningParameters rangeTuningParameters);
|
|
|
|
ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferVertical(ASScrollDirection scrollDirection,
|
|
ASRangeTuningParameters rangeTuningParameters);
|
|
|
|
CGRect CGRectExpandToRangeWithScrollableDirections(CGRect rect,
|
|
ASRangeTuningParameters tuningParameters,
|
|
ASScrollDirection scrollableDirections,
|
|
ASScrollDirection scrollDirection);
|
|
|
|
ASDISPLAYNODE_EXTERN_C_END
|
|
|
|
NS_ASSUME_NONNULL_END
|