Introduce ASLayoutableContext

- The struct is mapped to ID of the current thread and used by subnodes to decide whether they should proceed measurement.
This commit is contained in:
Huy Nguyen
2016-03-27 17:09:59 -07:00
parent dba16ce009
commit 81d26994c5
5 changed files with 71 additions and 10 deletions

View File

@@ -14,6 +14,19 @@
@class ASLayoutOptions;
@protocol ASLayoutable;
struct ASLayoutableContext {
int32_t transitionID;
BOOL needsVisualizeNode;
};
extern struct ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisualizeNode);
extern void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context);
extern struct ASLayoutableContext ASLayoutableGetLayoutableContext();
extern void ASLayoutableResetLayoutableContext();
/**
* The base protocol for ASLayoutable. Generally the methods/properties in this class do not need to be
* called by the end user and are only called internally. However, there may be a case where the methods are useful.