BVB Source Codes

AsyncDisplayKit Show ASLayoutRangeType.h Source code

Return Download AsyncDisplayKit: download ASLayoutRangeType.h Source code - Download AsyncDisplayKit Source code - Type:.h
  1. //
  2. //  ASLayoutRangeType.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. #import <Foundation/Foundation.h>
  12. #import <CoreGraphics/CGGeometry.h>
  13.  
  14. typedef struct {
  15.   CGFloat leadingBufferScreenfuls;
  16.   CGFloat trailingBufferScreenfuls;
  17. } ASRangeTuningParameters;
  18.  
  19. FOUNDATION_EXPORT ASRangeTuningParameters const ASRangeTuningParametersZero;
  20.  
  21. FOUNDATION_EXPORT BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRangeTuningParameters lhs, ASRangeTuningParameters rhs);
  22.  
  23. /**
  24.  * Each mode has a complete set of tuning parameters for range types.
  25.  * Depending on some conditions (including interface state and direction of the scroll view, state of rendering engine, etc),
  26.  * a range controller can choose which mode it should use at a given time.
  27.  */
  28. typedef NS_ENUM(NSInteger, ASLayoutRangeMode) {
  29.   ASLayoutRangeModeUnspecified = -1,
  30.  
  31.   /**
  32.    * Minimum mode is used when a range controller should limit the amount of work it performs.
  33.    * Thus, fewer views/layers are created and less data is fetched, saving system resources.
  34.    * Range controller can automatically switch to full mode when conditions change.
  35.    */
  36.   ASLayoutRangeModeMinimum = 0,
  37.    
  38.   /**
  39.    * Normal/Full mode that a range controller uses to provide the best experience for end users.
  40.    * This mode is usually used for an active scroll view.
  41.    * A range controller under this requires more resources compare to minimum mode.
  42.    */
  43.   ASLayoutRangeModeFull,
  44.  
  45.   /**
  46.    * Visible Only mode is used when a range controller should set its display and preload regions to only the size of their bounds.
  47.    * This causes all additional backing stores & preloaded data to be released, while ensuring a user revisiting the view will
  48.    * still be able to see the expected content.  This mode is automatically set on all ASRangeControllers when the app suspends,
  49.    * allowing the operating system to keep the app alive longer and increase the chance it is still warm when the user returns.
  50.    */
  51.   ASLayoutRangeModeVisibleOnly,
  52.  
  53.   /**
  54.    * Low Memory mode is used when a range controller should discard ALL graphics buffers, including for the area that would be visible
  55.    * the next time the user views it (bounds).  The only range it preserves is Preload, which is limited to the bounds, allowing
  56.    * the content to be restored relatively quickly by re-decoding images (the compressed images are ~10% the size of the decoded ones,
  57.    * and text is a tiny fraction of its rendered size).
  58.    */
  59.   ASLayoutRangeModeLowMemory
  60. };
  61.  
  62. static NSInteger const ASLayoutRangeModeCount = 4;
  63.  
  64. typedef NS_ENUM(NSInteger, ASLayoutRangeType) {
  65.   ASLayoutRangeTypeDisplay,
  66.   ASLayoutRangeTypePreload
  67. };
  68.  
  69. static NSInteger const ASLayoutRangeTypeCount = 2;
  70.  
  71. #define ASLayoutRangeTypeRender ASLayoutRangeTypeDisplay
  72. #define ASLayoutRangeTypeFetchData ASLayoutRangeTypePreload
  73.  
downloadASLayoutRangeType.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